1. Packages
  2. Ibm Provider
  3. API Docs
  4. NetworkPublicIp
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.NetworkPublicIp

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Create, delete, and update a public IP resource to route between servers. Public IPs are not restricted to routing within the same data center. For more information, about IBM Cloud network public IP, see networking services.

    For more information, see IBM Cloud Classic Infrastructure (SoftLayer) API docs

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const testPublicIp_ = new ibm.NetworkPublicIp("testPublicIp ", {
        notes: "public ip notes",
        routesTo: "119.81.82.163",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    test_public_ip_ = ibm.NetworkPublicIp("testPublicIp ",
        notes="public ip notes",
        routes_to="119.81.82.163")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.NewNetworkPublicIp(ctx, "testPublicIp ", &ibm.NetworkPublicIpArgs{
    			Notes:    pulumi.String("public ip notes"),
    			RoutesTo: pulumi.String("119.81.82.163"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var testPublicIp_ = new Ibm.NetworkPublicIp("testPublicIp ", new()
        {
            Notes = "public ip notes",
            RoutesTo = "119.81.82.163",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.NetworkPublicIp;
    import com.pulumi.ibm.NetworkPublicIpArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var testPublicIp_ = new NetworkPublicIp("testPublicIp ", NetworkPublicIpArgs.builder()
                .notes("public ip notes")
                .routesTo("119.81.82.163")
                .build());
    
        }
    }
    
    resources:
      'testPublicIp ':
        type: ibm:NetworkPublicIp
        properties:
          notes: public ip notes
          routesTo: 119.81.82.163
    

    Argument reference

    Review the argument references that you can specify for your resource.

    • notes- (Optional, String) Descriptive text to associate with the public IP instance.
    • routes_to - (Required, String) The destination IP address that the public IP routes traffic through. The destination IP address can be a public IP address of IBM resources in the same account, such as a public IP address of a VM or public virtual IP addresses of NetscalerVPXs.
    • tags- (Optional, Array of string) Tags associated with the public IP instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.

    Create NetworkPublicIp Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NetworkPublicIp(name: string, args: NetworkPublicIpArgs, opts?: CustomResourceOptions);
    @overload
    def NetworkPublicIp(resource_name: str,
                        args: NetworkPublicIpArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def NetworkPublicIp(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        routes_to: Optional[str] = None,
                        network_public_ip_id: Optional[str] = None,
                        notes: Optional[str] = None,
                        tags: Optional[Sequence[str]] = None,
                        timeouts: Optional[NetworkPublicIpTimeoutsArgs] = None)
    func NewNetworkPublicIp(ctx *Context, name string, args NetworkPublicIpArgs, opts ...ResourceOption) (*NetworkPublicIp, error)
    public NetworkPublicIp(string name, NetworkPublicIpArgs args, CustomResourceOptions? opts = null)
    public NetworkPublicIp(String name, NetworkPublicIpArgs args)
    public NetworkPublicIp(String name, NetworkPublicIpArgs args, CustomResourceOptions options)
    
    type: ibm:NetworkPublicIp
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args NetworkPublicIpArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args NetworkPublicIpArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args NetworkPublicIpArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkPublicIpArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkPublicIpArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var networkPublicIpResource = new Ibm.NetworkPublicIp("networkPublicIpResource", new()
    {
        RoutesTo = "string",
        NetworkPublicIpId = "string",
        Notes = "string",
        Tags = new[]
        {
            "string",
        },
        Timeouts = new Ibm.Inputs.NetworkPublicIpTimeoutsArgs
        {
            Create = "string",
        },
    });
    
    example, err := ibm.NewNetworkPublicIp(ctx, "networkPublicIpResource", &ibm.NetworkPublicIpArgs{
    	RoutesTo:          pulumi.String("string"),
    	NetworkPublicIpId: pulumi.String("string"),
    	Notes:             pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Timeouts: &ibm.NetworkPublicIpTimeoutsArgs{
    		Create: pulumi.String("string"),
    	},
    })
    
    var networkPublicIpResource = new NetworkPublicIp("networkPublicIpResource", NetworkPublicIpArgs.builder()
        .routesTo("string")
        .networkPublicIpId("string")
        .notes("string")
        .tags("string")
        .timeouts(NetworkPublicIpTimeoutsArgs.builder()
            .create("string")
            .build())
        .build());
    
    network_public_ip_resource = ibm.NetworkPublicIp("networkPublicIpResource",
        routes_to="string",
        network_public_ip_id="string",
        notes="string",
        tags=["string"],
        timeouts={
            "create": "string",
        })
    
    const networkPublicIpResource = new ibm.NetworkPublicIp("networkPublicIpResource", {
        routesTo: "string",
        networkPublicIpId: "string",
        notes: "string",
        tags: ["string"],
        timeouts: {
            create: "string",
        },
    });
    
    type: ibm:NetworkPublicIp
    properties:
        networkPublicIpId: string
        notes: string
        routesTo: string
        tags:
            - string
        timeouts:
            create: string
    

    NetworkPublicIp Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The NetworkPublicIp resource accepts the following input properties:

    RoutesTo string
    Route info
    NetworkPublicIpId string
    (String) The unique identifier of the public IP.
    Notes string
    Additional notes
    Tags List<string>
    List of tags
    Timeouts NetworkPublicIpTimeouts
    RoutesTo string
    Route info
    NetworkPublicIpId string
    (String) The unique identifier of the public IP.
    Notes string
    Additional notes
    Tags []string
    List of tags
    Timeouts NetworkPublicIpTimeoutsArgs
    routesTo String
    Route info
    networkPublicIpId String
    (String) The unique identifier of the public IP.
    notes String
    Additional notes
    tags List<String>
    List of tags
    timeouts NetworkPublicIpTimeouts
    routesTo string
    Route info
    networkPublicIpId string
    (String) The unique identifier of the public IP.
    notes string
    Additional notes
    tags string[]
    List of tags
    timeouts NetworkPublicIpTimeouts
    routes_to str
    Route info
    network_public_ip_id str
    (String) The unique identifier of the public IP.
    notes str
    Additional notes
    tags Sequence[str]
    List of tags
    timeouts NetworkPublicIpTimeoutsArgs
    routesTo String
    Route info
    networkPublicIpId String
    (String) The unique identifier of the public IP.
    notes String
    Additional notes
    tags List<String>
    List of tags
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NetworkPublicIp resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    IpAddress string
    (String) The address of the public IP.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpAddress string
    (String) The address of the public IP.
    id String
    The provider-assigned unique ID for this managed resource.
    ipAddress String
    (String) The address of the public IP.
    id string
    The provider-assigned unique ID for this managed resource.
    ipAddress string
    (String) The address of the public IP.
    id str
    The provider-assigned unique ID for this managed resource.
    ip_address str
    (String) The address of the public IP.
    id String
    The provider-assigned unique ID for this managed resource.
    ipAddress String
    (String) The address of the public IP.

    Look up Existing NetworkPublicIp Resource

    Get an existing NetworkPublicIp resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: NetworkPublicIpState, opts?: CustomResourceOptions): NetworkPublicIp
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ip_address: Optional[str] = None,
            network_public_ip_id: Optional[str] = None,
            notes: Optional[str] = None,
            routes_to: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            timeouts: Optional[NetworkPublicIpTimeoutsArgs] = None) -> NetworkPublicIp
    func GetNetworkPublicIp(ctx *Context, name string, id IDInput, state *NetworkPublicIpState, opts ...ResourceOption) (*NetworkPublicIp, error)
    public static NetworkPublicIp Get(string name, Input<string> id, NetworkPublicIpState? state, CustomResourceOptions? opts = null)
    public static NetworkPublicIp get(String name, Output<String> id, NetworkPublicIpState state, CustomResourceOptions options)
    resources:  _:    type: ibm:NetworkPublicIp    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    IpAddress string
    (String) The address of the public IP.
    NetworkPublicIpId string
    (String) The unique identifier of the public IP.
    Notes string
    Additional notes
    RoutesTo string
    Route info
    Tags List<string>
    List of tags
    Timeouts NetworkPublicIpTimeouts
    IpAddress string
    (String) The address of the public IP.
    NetworkPublicIpId string
    (String) The unique identifier of the public IP.
    Notes string
    Additional notes
    RoutesTo string
    Route info
    Tags []string
    List of tags
    Timeouts NetworkPublicIpTimeoutsArgs
    ipAddress String
    (String) The address of the public IP.
    networkPublicIpId String
    (String) The unique identifier of the public IP.
    notes String
    Additional notes
    routesTo String
    Route info
    tags List<String>
    List of tags
    timeouts NetworkPublicIpTimeouts
    ipAddress string
    (String) The address of the public IP.
    networkPublicIpId string
    (String) The unique identifier of the public IP.
    notes string
    Additional notes
    routesTo string
    Route info
    tags string[]
    List of tags
    timeouts NetworkPublicIpTimeouts
    ip_address str
    (String) The address of the public IP.
    network_public_ip_id str
    (String) The unique identifier of the public IP.
    notes str
    Additional notes
    routes_to str
    Route info
    tags Sequence[str]
    List of tags
    timeouts NetworkPublicIpTimeoutsArgs
    ipAddress String
    (String) The address of the public IP.
    networkPublicIpId String
    (String) The unique identifier of the public IP.
    notes String
    Additional notes
    routesTo String
    Route info
    tags List<String>
    List of tags
    timeouts Property Map

    Supporting Types

    NetworkPublicIpTimeouts, NetworkPublicIpTimeoutsArgs

    Create string
    Create string
    create String
    create string
    create str
    create String

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud