ibm.NetworkPublicIp
Explore with Pulumi AI
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. NoteTags
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:
- Routes
To string - Route info
- Network
Public stringIp Id - (String) The unique identifier of the public IP.
- Notes string
- Additional notes
- List<string>
- List of tags
- Timeouts
Network
Public Ip Timeouts
- Routes
To string - Route info
- Network
Public stringIp Id - (String) The unique identifier of the public IP.
- Notes string
- Additional notes
- []string
- List of tags
- Timeouts
Network
Public Ip Timeouts Args
- routes
To String - Route info
- network
Public StringIp Id - (String) The unique identifier of the public IP.
- notes String
- Additional notes
- List<String>
- List of tags
- timeouts
Network
Public Ip Timeouts
- routes
To string - Route info
- network
Public stringIp Id - (String) The unique identifier of the public IP.
- notes string
- Additional notes
- string[]
- List of tags
- timeouts
Network
Public Ip Timeouts
- routes_
to str - Route info
- network_
public_ strip_ id - (String) The unique identifier of the public IP.
- notes str
- Additional notes
- Sequence[str]
- List of tags
- timeouts
Network
Public Ip Timeouts Args
- routes
To String - Route info
- network
Public StringIp Id - (String) The unique identifier of the public IP.
- notes String
- Additional notes
- 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 str
- The provider-assigned unique ID for this managed resource.
- ip_
address str - (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.
- Ip
Address string - (String) The address of the public IP.
- Network
Public stringIp Id - (String) The unique identifier of the public IP.
- Notes string
- Additional notes
- Routes
To string - Route info
- List<string>
- List of tags
- Timeouts
Network
Public Ip Timeouts
- Ip
Address string - (String) The address of the public IP.
- Network
Public stringIp Id - (String) The unique identifier of the public IP.
- Notes string
- Additional notes
- Routes
To string - Route info
- []string
- List of tags
- Timeouts
Network
Public Ip Timeouts Args
- ip
Address String - (String) The address of the public IP.
- network
Public StringIp Id - (String) The unique identifier of the public IP.
- notes String
- Additional notes
- routes
To String - Route info
- List<String>
- List of tags
- timeouts
Network
Public Ip Timeouts
- ip
Address string - (String) The address of the public IP.
- network
Public stringIp Id - (String) The unique identifier of the public IP.
- notes string
- Additional notes
- routes
To string - Route info
- string[]
- List of tags
- timeouts
Network
Public Ip Timeouts
- ip_
address str - (String) The address of the public IP.
- network_
public_ strip_ id - (String) The unique identifier of the public IP.
- notes str
- Additional notes
- routes_
to str - Route info
- Sequence[str]
- List of tags
- timeouts
Network
Public Ip Timeouts Args
- ip
Address String - (String) The address of the public IP.
- network
Public StringIp Id - (String) The unique identifier of the public IP.
- notes String
- Additional notes
- routes
To String - Route info
- 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.