@pulumi/linode
Version:
A Pulumi package for creating and managing linode cloud resources.
169 lines (168 loc) • 5.6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Manages a Linode instance IP.
* For more information, see the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/post-add-linode-ip).
*
* > **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.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as linode from "@pulumi/linode";
*
* const foo = new linode.Instance("foo", {
* image: "linode/alpine3.19",
* label: "foobar-test",
* type: "g6-nanode-1",
* region: "us-east",
* });
* const fooInstanceIp = new linode.InstanceIp("foo", {
* linodeId: foo.id,
* "public": true,
* });
* ```
*/
export declare class InstanceIp extends pulumi.CustomResource {
/**
* Get an existing InstanceIp resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InstanceIpState, opts?: pulumi.CustomResourceOptions): InstanceIp;
/**
* Returns true if the given object is an instance of InstanceIp. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is InstanceIp;
/**
* The resulting IPv4 address.
*/
readonly address: pulumi.Output<string>;
/**
* If true, the instance will be rebooted to update network interfaces.
*/
readonly applyImmediately: pulumi.Output<boolean>;
/**
* The default gateway for this address
*/
readonly gateway: pulumi.Output<string>;
/**
* The ID of the Linode to allocate an IPv4 address for.
*/
readonly linodeId: pulumi.Output<number>;
/**
* The number of bits set in the subnet mask.
*/
readonly prefix: pulumi.Output<number>;
/**
* Whether the IPv4 address is public or private. Defaults to true.
*/
readonly public: pulumi.Output<boolean>;
/**
* The reverse DNS assigned to this address.
*/
readonly rdns: pulumi.Output<string>;
/**
* The region this IP resides in.
*/
readonly region: pulumi.Output<string>;
/**
* The mask that separates host bits from network bits for this address.
*/
readonly subnetMask: pulumi.Output<string>;
/**
* The type of IP address. (`ipv4`, `ipv6`, `ipv6/pool`, `ipv6/range`)
*/
readonly type: pulumi.Output<string>;
/**
* Contains information about the NAT 1:1 mapping of a public IP address to a VPC subnet.
*/
readonly vpcNat11s: pulumi.Output<outputs.InstanceIpVpcNat11[]>;
/**
* Create a InstanceIp resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: InstanceIpArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering InstanceIp resources.
*/
export interface InstanceIpState {
/**
* The resulting IPv4 address.
*/
address?: pulumi.Input<string>;
/**
* If true, the instance will be rebooted to update network interfaces.
*/
applyImmediately?: pulumi.Input<boolean>;
/**
* The default gateway for this address
*/
gateway?: pulumi.Input<string>;
/**
* The ID of the Linode to allocate an IPv4 address for.
*/
linodeId?: pulumi.Input<number>;
/**
* The number of bits set in the subnet mask.
*/
prefix?: pulumi.Input<number>;
/**
* Whether the IPv4 address is public or private. Defaults to true.
*/
public?: pulumi.Input<boolean>;
/**
* The reverse DNS assigned to this address.
*/
rdns?: pulumi.Input<string>;
/**
* The region this IP resides in.
*/
region?: pulumi.Input<string>;
/**
* The mask that separates host bits from network bits for this address.
*/
subnetMask?: pulumi.Input<string>;
/**
* The type of IP address. (`ipv4`, `ipv6`, `ipv6/pool`, `ipv6/range`)
*/
type?: pulumi.Input<string>;
/**
* Contains information about the NAT 1:1 mapping of a public IP address to a VPC subnet.
*/
vpcNat11s?: pulumi.Input<pulumi.Input<inputs.InstanceIpVpcNat11>[]>;
}
/**
* The set of arguments for constructing a InstanceIp resource.
*/
export interface InstanceIpArgs {
/**
* If true, the instance will be rebooted to update network interfaces.
*/
applyImmediately?: pulumi.Input<boolean>;
/**
* The ID of the Linode to allocate an IPv4 address for.
*/
linodeId: pulumi.Input<number>;
/**
* Whether the IPv4 address is public or private. Defaults to true.
*/
public?: pulumi.Input<boolean>;
/**
* The reverse DNS assigned to this address.
*/
rdns?: pulumi.Input<string>;
}