linode.NetworkingIp
Explore with Pulumi AI
Manages allocation of reserved IPv4 address in a region and optionally assigning the reserved address to a Linode instance.
For more information, see the corresponding API documentation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
const testIp = new linode.NetworkingIp("test_ip", {
type: "ipv4",
linodeId: 12345,
"public": true,
});
import pulumi
import pulumi_linode as linode
test_ip = linode.NetworkingIp("test_ip",
type="ipv4",
linode_id=12345,
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 {
_, err := linode.NewNetworkingIp(ctx, "test_ip", &linode.NetworkingIpArgs{
Type: pulumi.String("ipv4"),
LinodeId: pulumi.Int(12345),
Public: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;
return await Deployment.RunAsync(() =>
{
var testIp = new Linode.NetworkingIp("test_ip", new()
{
Type = "ipv4",
LinodeId = 12345,
Public = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.NetworkingIp;
import com.pulumi.linode.NetworkingIpArgs;
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 testIp = new NetworkingIp("testIp", NetworkingIpArgs.builder()
.type("ipv4")
.linodeId(12345)
.public_(true)
.build());
}
}
resources:
testIp:
type: linode:NetworkingIp
name: test_ip
properties:
type: ipv4
linodeId: 12345
public: true
Create NetworkingIp Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkingIp(name: string, args?: NetworkingIpArgs, opts?: CustomResourceOptions);
@overload
def NetworkingIp(resource_name: str,
args: Optional[NetworkingIpArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def NetworkingIp(resource_name: str,
opts: Optional[ResourceOptions] = None,
linode_id: Optional[int] = None,
public: Optional[bool] = None,
region: Optional[str] = None,
reserved: Optional[bool] = None,
type: Optional[str] = None)
func NewNetworkingIp(ctx *Context, name string, args *NetworkingIpArgs, opts ...ResourceOption) (*NetworkingIp, error)
public NetworkingIp(string name, NetworkingIpArgs? args = null, CustomResourceOptions? opts = null)
public NetworkingIp(String name, NetworkingIpArgs args)
public NetworkingIp(String name, NetworkingIpArgs args, CustomResourceOptions options)
type: linode:NetworkingIp
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 NetworkingIpArgs
- 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 NetworkingIpArgs
- 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 NetworkingIpArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkingIpArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkingIpArgs
- 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 networkingIpResource = new Linode.NetworkingIp("networkingIpResource", new()
{
LinodeId = 0,
Public = false,
Region = "string",
Reserved = false,
Type = "string",
});
example, err := linode.NewNetworkingIp(ctx, "networkingIpResource", &linode.NetworkingIpArgs{
LinodeId: pulumi.Int(0),
Public: pulumi.Bool(false),
Region: pulumi.String("string"),
Reserved: pulumi.Bool(false),
Type: pulumi.String("string"),
})
var networkingIpResource = new NetworkingIp("networkingIpResource", NetworkingIpArgs.builder()
.linodeId(0)
.public_(false)
.region("string")
.reserved(false)
.type("string")
.build());
networking_ip_resource = linode.NetworkingIp("networkingIpResource",
linode_id=0,
public=False,
region="string",
reserved=False,
type="string")
const networkingIpResource = new linode.NetworkingIp("networkingIpResource", {
linodeId: 0,
"public": false,
region: "string",
reserved: false,
type: "string",
});
type: linode:NetworkingIp
properties:
linodeId: 0
public: false
region: string
reserved: false
type: string
NetworkingIp 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 NetworkingIp resource accepts the following input properties:
- Linode
Id int - The ID of the Linode to which the IP address will be assigned. Updating this field on an ephemeral IP will trigger a recreation. Conflicts with
region
. - Public bool
- Whether the IP address is public. Defaults to true.
- Region string
- The region for the reserved IPv4 address. Required when reserved is true and linode_id is not set.
- Reserved bool
- Whether the IPv4 address should be reserved.
- Type string
- The type of IP address. (ipv4, ipv6, etc.)
- Linode
Id int - The ID of the Linode to which the IP address will be assigned. Updating this field on an ephemeral IP will trigger a recreation. Conflicts with
region
. - Public bool
- Whether the IP address is public. Defaults to true.
- Region string
- The region for the reserved IPv4 address. Required when reserved is true and linode_id is not set.
- Reserved bool
- Whether the IPv4 address should be reserved.
- Type string
- The type of IP address. (ipv4, ipv6, etc.)
- linode
Id Integer - The ID of the Linode to which the IP address will be assigned. Updating this field on an ephemeral IP will trigger a recreation. Conflicts with
region
. - public_ Boolean
- Whether the IP address is public. Defaults to true.
- region String
- The region for the reserved IPv4 address. Required when reserved is true and linode_id is not set.
- reserved Boolean
- Whether the IPv4 address should be reserved.
- type String
- The type of IP address. (ipv4, ipv6, etc.)
- linode
Id number - The ID of the Linode to which the IP address will be assigned. Updating this field on an ephemeral IP will trigger a recreation. Conflicts with
region
. - public boolean
- Whether the IP address is public. Defaults to true.
- region string
- The region for the reserved IPv4 address. Required when reserved is true and linode_id is not set.
- reserved boolean
- Whether the IPv4 address should be reserved.
- type string
- The type of IP address. (ipv4, ipv6, etc.)
- linode_
id int - The ID of the Linode to which the IP address will be assigned. Updating this field on an ephemeral IP will trigger a recreation. Conflicts with
region
. - public bool
- Whether the IP address is public. Defaults to true.
- region str
- The region for the reserved IPv4 address. Required when reserved is true and linode_id is not set.
- reserved bool
- Whether the IPv4 address should be reserved.
- type str
- The type of IP address. (ipv4, ipv6, etc.)
- linode
Id Number - The ID of the Linode to which the IP address will be assigned. Updating this field on an ephemeral IP will trigger a recreation. Conflicts with
region
. - public Boolean
- Whether the IP address is public. Defaults to true.
- region String
- The region for the reserved IPv4 address. Required when reserved is true and linode_id is not set.
- reserved Boolean
- Whether the IPv4 address should be reserved.
- type String
- The type of IP address. (ipv4, ipv6, etc.)
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkingIp resource produces the following output properties:
- Address string
- The IPv4 address that is configured as a 1:1 NAT for this VPC interface.
- 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.
- Rdns string
- The reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set.
- Subnet
Mask string - The mask that separates host bits from network bits for this address.
- Vpc
Nat11 NetworkingIp Vpc Nat11 - Contains information about the NAT 1:1 mapping of a public IP address to a VPC subnet.
- Address string
- The IPv4 address that is configured as a 1:1 NAT for this VPC interface.
- 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.
- Rdns string
- The reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set.
- Subnet
Mask string - The mask that separates host bits from network bits for this address.
- Vpc
Nat11 NetworkingIp Vpc Nat11 - Contains information about the NAT 1:1 mapping of a public IP address to a VPC subnet.
- address String
- The IPv4 address that is configured as a 1:1 NAT for this VPC interface.
- 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.
- rdns String
- The reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set.
- subnet
Mask String - The mask that separates host bits from network bits for this address.
- vpc
Nat11 NetworkingIp Vpc Nat11 - Contains information about the NAT 1:1 mapping of a public IP address to a VPC subnet.
- address string
- The IPv4 address that is configured as a 1:1 NAT for this VPC interface.
- 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.
- rdns string
- The reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set.
- subnet
Mask string - The mask that separates host bits from network bits for this address.
- vpc
Nat11 NetworkingIp Vpc Nat11 - Contains information about the NAT 1:1 mapping of a public IP address to a VPC subnet.
- address str
- The IPv4 address that is configured as a 1:1 NAT for this VPC interface.
- 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.
- rdns str
- The reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set.
- subnet_
mask str - The mask that separates host bits from network bits for this address.
- vpc_
nat11 NetworkingIp Vpc Nat11 - Contains information about the NAT 1:1 mapping of a public IP address to a VPC subnet.
- address String
- The IPv4 address that is configured as a 1:1 NAT for this VPC interface.
- 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.
- rdns String
- The reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set.
- subnet
Mask String - The mask that separates host bits from network bits for this address.
- vpc
Nat11 Property Map - Contains information about the NAT 1:1 mapping of a public IP address to a VPC subnet.
Look up Existing NetworkingIp Resource
Get an existing NetworkingIp 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?: NetworkingIpState, opts?: CustomResourceOptions): NetworkingIp
@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,
reserved: Optional[bool] = None,
subnet_mask: Optional[str] = None,
type: Optional[str] = None,
vpc_nat11: Optional[NetworkingIpVpcNat11Args] = None) -> NetworkingIp
func GetNetworkingIp(ctx *Context, name string, id IDInput, state *NetworkingIpState, opts ...ResourceOption) (*NetworkingIp, error)
public static NetworkingIp Get(string name, Input<string> id, NetworkingIpState? state, CustomResourceOptions? opts = null)
public static NetworkingIp get(String name, Output<String> id, NetworkingIpState state, CustomResourceOptions options)
resources: _: type: linode:NetworkingIp 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.
- Address string
- The IPv4 address that is configured as a 1:1 NAT for this VPC interface.
- Gateway string
- The default gateway for this address.
- Linode
Id int - The ID of the Linode to which the IP address will be assigned. Updating this field on an ephemeral IP will trigger a recreation. Conflicts with
region
. - Prefix int
- The number of bits set in the subnet mask.
- Public bool
- Whether the IP address is public. Defaults to true.
- Rdns string
- The reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set.
- Region string
- The region for the reserved IPv4 address. Required when reserved is true and linode_id is not set.
- Reserved bool
- Whether the IPv4 address should be reserved.
- Subnet
Mask string - The mask that separates host bits from network bits for this address.
- Type string
- The type of IP address. (ipv4, ipv6, etc.)
- Vpc
Nat11 NetworkingIp Vpc Nat11 - Contains information about the NAT 1:1 mapping of a public IP address to a VPC subnet.
- Address string
- The IPv4 address that is configured as a 1:1 NAT for this VPC interface.
- Gateway string
- The default gateway for this address.
- Linode
Id int - The ID of the Linode to which the IP address will be assigned. Updating this field on an ephemeral IP will trigger a recreation. Conflicts with
region
. - Prefix int
- The number of bits set in the subnet mask.
- Public bool
- Whether the IP address is public. Defaults to true.
- Rdns string
- The reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set.
- Region string
- The region for the reserved IPv4 address. Required when reserved is true and linode_id is not set.
- Reserved bool
- Whether the IPv4 address should be reserved.
- Subnet
Mask string - The mask that separates host bits from network bits for this address.
- Type string
- The type of IP address. (ipv4, ipv6, etc.)
- Vpc
Nat11 NetworkingIp Vpc Nat11Args - Contains information about the NAT 1:1 mapping of a public IP address to a VPC subnet.
- address String
- The IPv4 address that is configured as a 1:1 NAT for this VPC interface.
- gateway String
- The default gateway for this address.
- linode
Id Integer - The ID of the Linode to which the IP address will be assigned. Updating this field on an ephemeral IP will trigger a recreation. Conflicts with
region
. - prefix Integer
- The number of bits set in the subnet mask.
- public_ Boolean
- Whether the IP address is public. Defaults to true.
- rdns String
- The reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set.
- region String
- The region for the reserved IPv4 address. Required when reserved is true and linode_id is not set.
- reserved Boolean
- Whether the IPv4 address should be reserved.
- subnet
Mask String - The mask that separates host bits from network bits for this address.
- type String
- The type of IP address. (ipv4, ipv6, etc.)
- vpc
Nat11 NetworkingIp Vpc Nat11 - Contains information about the NAT 1:1 mapping of a public IP address to a VPC subnet.
- address string
- The IPv4 address that is configured as a 1:1 NAT for this VPC interface.
- gateway string
- The default gateway for this address.
- linode
Id number - The ID of the Linode to which the IP address will be assigned. Updating this field on an ephemeral IP will trigger a recreation. Conflicts with
region
. - prefix number
- The number of bits set in the subnet mask.
- public boolean
- Whether the IP address is public. Defaults to true.
- rdns string
- The reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set.
- region string
- The region for the reserved IPv4 address. Required when reserved is true and linode_id is not set.
- reserved boolean
- Whether the IPv4 address should be reserved.
- subnet
Mask string - The mask that separates host bits from network bits for this address.
- type string
- The type of IP address. (ipv4, ipv6, etc.)
- vpc
Nat11 NetworkingIp Vpc Nat11 - Contains information about the NAT 1:1 mapping of a public IP address to a VPC subnet.
- address str
- The IPv4 address that is configured as a 1:1 NAT for this VPC interface.
- gateway str
- The default gateway for this address.
- linode_
id int - The ID of the Linode to which the IP address will be assigned. Updating this field on an ephemeral IP will trigger a recreation. Conflicts with
region
. - prefix int
- The number of bits set in the subnet mask.
- public bool
- Whether the IP address is public. Defaults to true.
- rdns str
- The reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set.
- region str
- The region for the reserved IPv4 address. Required when reserved is true and linode_id is not set.
- reserved bool
- Whether the IPv4 address should be reserved.
- subnet_
mask str - The mask that separates host bits from network bits for this address.
- type str
- The type of IP address. (ipv4, ipv6, etc.)
- vpc_
nat11 NetworkingIp Vpc Nat11Args - Contains information about the NAT 1:1 mapping of a public IP address to a VPC subnet.
- address String
- The IPv4 address that is configured as a 1:1 NAT for this VPC interface.
- gateway String
- The default gateway for this address.
- linode
Id Number - The ID of the Linode to which the IP address will be assigned. Updating this field on an ephemeral IP will trigger a recreation. Conflicts with
region
. - prefix Number
- The number of bits set in the subnet mask.
- public Boolean
- Whether the IP address is public. Defaults to true.
- rdns String
- The reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set.
- region String
- The region for the reserved IPv4 address. Required when reserved is true and linode_id is not set.
- reserved Boolean
- Whether the IPv4 address should be reserved.
- subnet
Mask String - The mask that separates host bits from network bits for this address.
- type String
- The type of IP address. (ipv4, ipv6, etc.)
- vpc
Nat11 Property Map - Contains information about the NAT 1:1 mapping of a public IP address to a VPC subnet.
Supporting Types
NetworkingIpVpcNat11, NetworkingIpVpcNat11Args
Import
IP addresses can be imported using the IP address ID, e.g.
$ pulumi import linode:index/networkingIp:NetworkingIp example_ip 172.104.30.209
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Linode pulumi/pulumi-linode
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
linode
Terraform Provider.