InstanceIp

NOTICE: You may need to contact support to increase your instance IP limit before you can allocate additional IPs.

Manages a Linode instance IP.

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
    public MyStack()
    {
        var fooInstance = new Linode.Instance("fooInstance", new Linode.InstanceArgs
        {
            Image = "linode/alpine3.12",
            Label = "foobar-test",
            Type = "g6-nanode-1",
            Region = "us-east",
        });
        var fooInstanceIp = new Linode.InstanceIp("fooInstanceIp", new Linode.InstanceIpArgs
        {
            LinodeId = fooInstance.Id,
            Public = true,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-linode/sdk/v3/go/linode"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		fooInstance, err := linode.NewInstance(ctx, "fooInstance", &linode.InstanceArgs{
			Image:  pulumi.String("linode/alpine3.12"),
			Label:  pulumi.String("foobar-test"),
			Type:   pulumi.String("g6-nanode-1"),
			Region: pulumi.String("us-east"),
		})
		if err != nil {
			return err
		}
		_, err = linode.NewInstanceIp(ctx, "fooInstanceIp", &linode.InstanceIpArgs{
			LinodeId: fooInstance.ID(),
			Public:   pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_linode as linode

foo_instance = linode.Instance("fooInstance",
    image="linode/alpine3.12",
    label="foobar-test",
    type="g6-nanode-1",
    region="us-east")
foo_instance_ip = linode.InstanceIp("fooInstanceIp",
    linode_id=foo_instance.id,
    public=True)
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";

const fooInstance = new linode.Instance("fooInstance", {
    image: "linode/alpine3.12",
    label: "foobar-test",
    type: "g6-nanode-1",
    region: "us-east",
});
const fooInstanceIp = new linode.InstanceIp("fooInstanceIp", {
    linodeId: fooInstance.id,
    "public": true,
});

Create a InstanceIp Resource

new InstanceIp(name: string, args: InstanceIpArgs, opts?: CustomResourceOptions);
@overload
def InstanceIp(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               linode_id: Optional[int] = None,
               public: Optional[bool] = None,
               rdns: Optional[str] = None)
@overload
def InstanceIp(resource_name: str,
               args: InstanceIpArgs,
               opts: Optional[ResourceOptions] = None)
func NewInstanceIp(ctx *Context, name string, args InstanceIpArgs, opts ...ResourceOption) (*InstanceIp, error)
public InstanceIp(string name, InstanceIpArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args InstanceIpArgs
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 InstanceIpArgs
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 InstanceIpArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args InstanceIpArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

InstanceIp Resource Properties

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

Inputs

The InstanceIp resource accepts the following input properties:

LinodeId int
The ID of the Linode to allocate an IPv4 address for.
Public bool
Whether the IPv4 address is public or private. Defaults to true.
Rdns string
The reverse DNS assigned to this address.
LinodeId int
The ID of the Linode to allocate an IPv4 address for.
Public bool
Whether the IPv4 address is public or private. Defaults to true.
Rdns string
The reverse DNS assigned to this address.
linodeId number
The ID of the Linode to allocate an IPv4 address for.
public boolean
Whether the IPv4 address is public or private. Defaults to true.
rdns string
The reverse DNS assigned to this address.
linode_id int
The ID of the Linode to allocate an IPv4 address for.
public bool
Whether the IPv4 address is public or private. Defaults to true.
rdns str
The reverse DNS assigned to this address.

Outputs

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

Address string
The resulting IPv4 address.
Gateway string
The default gateway for this address
Id string
The provider-assigned unique ID for this managed resource.
Prefix int
The number of bits set in the subnet mask.
Region string
The region this IP resides in.
SubnetMask string
The mask that separates host bits from network bits for this address.
Type string
The type of IP address.
Address string
The resulting IPv4 address.
Gateway string
The default gateway for this address
Id string
The provider-assigned unique ID for this managed resource.
Prefix int
The number of bits set in the subnet mask.
Region string
The region this IP resides in.
SubnetMask string
The mask that separates host bits from network bits for this address.
Type string
The type of IP address.
address string
The resulting IPv4 address.
gateway string
The default gateway for this address
id string
The provider-assigned unique ID for this managed resource.
prefix number
The number of bits set in the subnet mask.
region string
The region this IP resides in.
subnetMask string
The mask that separates host bits from network bits for this address.
type string
The type of IP address.
address str
The resulting IPv4 address.
gateway str
The default gateway for this address
id str
The provider-assigned unique ID for this managed resource.
prefix int
The number of bits set in the subnet mask.
region str
The region this IP resides in.
subnet_mask str
The mask that separates host bits from network bits for this address.
type str
The type of IP address.

Look up an Existing InstanceIp Resource

Get an existing InstanceIp 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?: InstanceIpState, opts?: CustomResourceOptions): InstanceIp
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        address: Optional[str] = None,
        gateway: Optional[str] = None,
        linode_id: Optional[int] = None,
        prefix: Optional[int] = None,
        public: Optional[bool] = None,
        rdns: Optional[str] = None,
        region: Optional[str] = None,
        subnet_mask: Optional[str] = None,
        type: Optional[str] = None) -> InstanceIp
func GetInstanceIp(ctx *Context, name string, id IDInput, state *InstanceIpState, opts ...ResourceOption) (*InstanceIp, error)
public static InstanceIp Get(string name, Input<string> id, InstanceIpState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Address string
The resulting IPv4 address.
Gateway string
The default gateway for this address
LinodeId int
The ID of the Linode to allocate an IPv4 address for.
Prefix int
The number of bits set in the subnet mask.
Public bool
Whether the IPv4 address is public or private. Defaults to true.
Rdns string
The reverse DNS assigned to this address.
Region string
The region this IP resides in.
SubnetMask string
The mask that separates host bits from network bits for this address.
Type string
The type of IP address.
Address string
The resulting IPv4 address.
Gateway string
The default gateway for this address
LinodeId int
The ID of the Linode to allocate an IPv4 address for.
Prefix int
The number of bits set in the subnet mask.
Public bool
Whether the IPv4 address is public or private. Defaults to true.
Rdns string
The reverse DNS assigned to this address.
Region string
The region this IP resides in.
SubnetMask string
The mask that separates host bits from network bits for this address.
Type string
The type of IP address.
address string
The resulting IPv4 address.
gateway string
The default gateway for this address
linodeId number
The ID of the Linode to allocate an IPv4 address for.
prefix number
The number of bits set in the subnet mask.
public boolean
Whether the IPv4 address is public or private. Defaults to true.
rdns string
The reverse DNS assigned to this address.
region string
The region this IP resides in.
subnetMask string
The mask that separates host bits from network bits for this address.
type string
The type of IP address.
address str
The resulting IPv4 address.
gateway str
The default gateway for this address
linode_id int
The ID of the Linode to allocate an IPv4 address for.
prefix int
The number of bits set in the subnet mask.
public bool
Whether the IPv4 address is public or private. Defaults to true.
rdns str
The reverse DNS assigned to this address.
region str
The region this IP resides in.
subnet_mask str
The mask that separates host bits from network bits for this address.
type str
The type of IP address.

Package Details

Repository
https://github.com/pulumi/pulumi-linode
License
Apache-2.0
Notes
This Pulumi package is based on the linode Terraform Provider.