linode.InstanceIp
Explore with Pulumi AI
NOTICE: You may need to contact support to increase your instance IP limit before you can allocate additional IPs.
NOTICE: This resource will reboot the specified instance following IP allocation.
Manages a Linode instance IP.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;
return await Deployment.RunAsync(() =>
{
var fooInstance = new Linode.Instance("fooInstance", new()
{
Image = "linode/alpine3.16",
Label = "foobar-test",
Type = "g6-nanode-1",
Region = "us-east",
});
var fooInstanceIp = new Linode.InstanceIp("fooInstanceIp", new()
{
LinodeId = fooInstance.Id,
Public = true,
});
});
package main
import (
"github.com/pulumi/pulumi-linode/sdk/v4/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.16"),
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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.Instance;
import com.pulumi.linode.InstanceArgs;
import com.pulumi.linode.InstanceIp;
import com.pulumi.linode.InstanceIpArgs;
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 fooInstance = new Instance("fooInstance", InstanceArgs.builder()
.image("linode/alpine3.16")
.label("foobar-test")
.type("g6-nanode-1")
.region("us-east")
.build());
var fooInstanceIp = new InstanceIp("fooInstanceIp", InstanceIpArgs.builder()
.linodeId(fooInstance.id())
.public_(true)
.build());
}
}
import pulumi
import pulumi_linode as linode
foo_instance = linode.Instance("fooInstance",
image="linode/alpine3.16",
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.16",
label: "foobar-test",
type: "g6-nanode-1",
region: "us-east",
});
const fooInstanceIp = new linode.InstanceIp("fooInstanceIp", {
linodeId: fooInstance.id,
"public": true,
});
resources:
fooInstance:
type: linode:Instance
properties:
image: linode/alpine3.16
label: foobar-test
type: g6-nanode-1
region: us-east
fooInstanceIp:
type: linode:InstanceIp
properties:
linodeId: ${fooInstance.id}
public: true
Create InstanceIp Resource
new InstanceIp(name: string, args: InstanceIpArgs, opts?: CustomResourceOptions);
@overload
def InstanceIp(resource_name: str,
opts: Optional[ResourceOptions] = None,
apply_immediately: Optional[bool] = 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)
public InstanceIp(String name, InstanceIpArgs args)
public InstanceIp(String name, InstanceIpArgs args, CustomResourceOptions options)
type: linode:InstanceIp
properties: # The arguments to resource properties.
options: # 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.
- 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.
- name String
- The unique name of the resource.
- args InstanceIpArgs
- The arguments to resource properties.
- options 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 Architecture and Concepts docs.
Inputs
The InstanceIp resource accepts the following input properties:
- Linode
Id int The ID of the Linode to allocate an IPv4 address for.
- Apply
Immediately bool If true, the instance will be rebooted to update network interfaces.
- Public bool
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.
- Apply
Immediately bool If true, the instance will be rebooted to update network interfaces.
- Public bool
Whether the IPv4 address is public or private. Defaults to true.
- Rdns string
The reverse DNS assigned to this address.
- linode
Id Integer The ID of the Linode to allocate an IPv4 address for.
- apply
Immediately Boolean If true, the instance will be rebooted to update network interfaces.
- public_ Boolean
Whether the IPv4 address is public or private. Defaults to true.
- rdns String
The reverse DNS assigned to this address.
- linode
Id number The ID of the Linode to allocate an IPv4 address for.
- apply
Immediately boolean If true, the instance will be rebooted to update network interfaces.
- 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.
- apply_
immediately bool If true, the instance will be rebooted to update network interfaces.
- public bool
Whether the IPv4 address is public or private. Defaults to true.
- rdns str
The reverse DNS assigned to this address.
- linode
Id Number The ID of the Linode to allocate an IPv4 address for.
- apply
Immediately Boolean If true, the instance will be rebooted to update network interfaces.
- public Boolean
Whether the IPv4 address is public or private. Defaults to true.
- rdns String
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.
- Subnet
Mask string The mask that separates host bits from network bits for this address.
- Type string
The type of IP address. (
ipv4
,ipv6
,ipv6/pool
,ipv6/range
)
- 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.
- Subnet
Mask string The mask that separates host bits from network bits for this address.
- Type string
The type of IP address. (
ipv4
,ipv6
,ipv6/pool
,ipv6/range
)
- 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 Integer
The number of bits set in the subnet mask.
- region String
The region this IP resides in.
- subnet
Mask String The mask that separates host bits from network bits for this address.
- type String
The type of IP address. (
ipv4
,ipv6
,ipv6/pool
,ipv6/range
)
- 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.
- subnet
Mask string The mask that separates host bits from network bits for this address.
- type string
The type of IP address. (
ipv4
,ipv6
,ipv6/pool
,ipv6/range
)
- 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. (
ipv4
,ipv6
,ipv6/pool
,ipv6/range
)
- 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.
- subnet
Mask String The mask that separates host bits from network bits for this address.
- type String
The type of IP address. (
ipv4
,ipv6
,ipv6/pool
,ipv6/range
)
Look up 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,
apply_immediately: Optional[bool] = 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)
public static InstanceIp get(String name, Output<String> id, InstanceIpState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Address string
The resulting IPv4 address.
- Apply
Immediately bool If true, the instance will be rebooted to update network interfaces.
- Gateway string
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 string
The reverse DNS assigned to this address.
- Region string
The region this IP resides in.
- Subnet
Mask string The mask that separates host bits from network bits for this address.
- Type string
The type of IP address. (
ipv4
,ipv6
,ipv6/pool
,ipv6/range
)
- Address string
The resulting IPv4 address.
- Apply
Immediately bool If true, the instance will be rebooted to update network interfaces.
- Gateway string
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 string
The reverse DNS assigned to this address.
- Region string
The region this IP resides in.
- Subnet
Mask string The mask that separates host bits from network bits for this address.
- Type string
The type of IP address. (
ipv4
,ipv6
,ipv6/pool
,ipv6/range
)
- address String
The resulting IPv4 address.
- apply
Immediately Boolean If true, the instance will be rebooted to update network interfaces.
- gateway String
The default gateway for this address
- linode
Id Integer The ID of the Linode to allocate an IPv4 address for.
- prefix Integer
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.
- subnet
Mask String The mask that separates host bits from network bits for this address.
- type String
The type of IP address. (
ipv4
,ipv6
,ipv6/pool
,ipv6/range
)
- address string
The resulting IPv4 address.
- apply
Immediately boolean If true, the instance will be rebooted to update network interfaces.
- gateway string
The default gateway for this address
- linode
Id 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.
- subnet
Mask string The mask that separates host bits from network bits for this address.
- type string
The type of IP address. (
ipv4
,ipv6
,ipv6/pool
,ipv6/range
)
- address str
The resulting IPv4 address.
- apply_
immediately bool If true, the instance will be rebooted to update network interfaces.
- 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. (
ipv4
,ipv6
,ipv6/pool
,ipv6/range
)
- address String
The resulting IPv4 address.
- apply
Immediately Boolean If true, the instance will be rebooted to update network interfaces.
- gateway String
The default gateway for this address
- linode
Id 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.
- subnet
Mask String The mask that separates host bits from network bits for this address.
- type String
The type of IP address. (
ipv4
,ipv6
,ipv6/pool
,ipv6/range
)
Package Details
- Repository
- Linode pulumi/pulumi-linode
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
linode
Terraform Provider.