UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

264 lines (263 loc) 7.77 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Books and manages IPAM IPs. * * For more information about IPAM, see the main [documentation](https://www.scaleway.com/en/docs/vpc/concepts/#ipam). * * ## Example Usage * * ### Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const vpc01 = new scaleway.network.Vpc("vpc01", {name: "my vpc"}); * const pn01 = new scaleway.network.PrivateNetwork("pn01", { * vpcId: vpc01.id, * ipv4Subnet: { * subnet: "172.16.32.0/22", * }, * }); * const ip01 = new scaleway.ipam.Ip("ip01", {sources: [{ * privateNetworkId: pn01.id, * }]}); * ``` * * ### Request a specific IPv4 address * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const vpc01 = new scaleway.network.Vpc("vpc01", {name: "my vpc"}); * const pn01 = new scaleway.network.PrivateNetwork("pn01", { * vpcId: vpc01.id, * ipv4Subnet: { * subnet: "172.16.32.0/22", * }, * }); * const ip01 = new scaleway.ipam.Ip("ip01", { * address: "172.16.32.7", * sources: [{ * privateNetworkId: pn01.id, * }], * }); * ``` * * ### Request an IPv6 address * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const vpc01 = new scaleway.network.Vpc("vpc01", {name: "my vpc"}); * const pn01 = new scaleway.network.PrivateNetwork("pn01", { * vpcId: vpc01.id, * ipv6Subnets: [{ * subnet: "fd46:78ab:30b8:177c::/64", * }], * }); * const ip01 = new scaleway.ipam.Ip("ip01", { * isIpv6: true, * sources: [{ * privateNetworkId: pn01.id, * }], * }); * ``` * * ### Book an IP for a custom resource * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const vpc01 = new scaleway.network.Vpc("vpc01", {name: "my vpc"}); * const pn01 = new scaleway.network.PrivateNetwork("pn01", { * vpcId: vpc01.id, * ipv4Subnet: { * subnet: "172.16.32.0/22", * }, * }); * const ip01 = new scaleway.ipam.Ip("ip01", { * address: "172.16.32.7", * sources: [{ * privateNetworkId: pn01.id, * }], * customResources: [{ * macAddress: "bc:24:11:74:d0:6a", * }], * }); * ``` * * ## Import * * IPAM IPs can be imported using `{region}/{id}`, e.g. * * bash * * ```sh * $ pulumi import scaleway:ipam/ip:Ip ip_demo fr-par/11111111-1111-1111-1111-111111111111 * ``` */ export declare class Ip extends pulumi.CustomResource { /** * Get an existing Ip 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?: IpState, opts?: pulumi.CustomResourceOptions): Ip; /** * Returns true if the given object is an instance of Ip. 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 Ip; /** * Request a specific IP in the requested source pool */ readonly address: pulumi.Output<string>; /** * Date and time of IP's creation (RFC 3339 format). */ readonly createdAt: pulumi.Output<string>; /** * The custom resource in which to book the IP */ readonly customResources: pulumi.Output<outputs.ipam.IpCustomResource[] | undefined>; /** * Defines whether to request an IPv6 address instead of IPv4. */ readonly isIpv6: pulumi.Output<boolean | undefined>; /** * `projectId`) The ID of the Project the IP is associated with. */ readonly projectId: pulumi.Output<string>; /** * `region`) The region of the IP. */ readonly region: pulumi.Output<string>; /** * The IP resource. */ readonly resources: pulumi.Output<outputs.ipam.IpResource[]>; /** * The reverse DNS for this IP. */ readonly reverses: pulumi.Output<outputs.ipam.IpReverse[]>; /** * The source in which to book the IP. */ readonly sources: pulumi.Output<outputs.ipam.IpSource[]>; /** * The tags associated with the IP. */ readonly tags: pulumi.Output<string[] | undefined>; /** * Date and time of IP's last update (RFC 3339 format). */ readonly updatedAt: pulumi.Output<string>; /** * The zone of the IP. */ readonly zone: pulumi.Output<string>; /** * Create a Ip 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: IpArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Ip resources. */ export interface IpState { /** * Request a specific IP in the requested source pool */ address?: pulumi.Input<string>; /** * Date and time of IP's creation (RFC 3339 format). */ createdAt?: pulumi.Input<string>; /** * The custom resource in which to book the IP */ customResources?: pulumi.Input<pulumi.Input<inputs.ipam.IpCustomResource>[]>; /** * Defines whether to request an IPv6 address instead of IPv4. */ isIpv6?: pulumi.Input<boolean>; /** * `projectId`) The ID of the Project the IP is associated with. */ projectId?: pulumi.Input<string>; /** * `region`) The region of the IP. */ region?: pulumi.Input<string>; /** * The IP resource. */ resources?: pulumi.Input<pulumi.Input<inputs.ipam.IpResource>[]>; /** * The reverse DNS for this IP. */ reverses?: pulumi.Input<pulumi.Input<inputs.ipam.IpReverse>[]>; /** * The source in which to book the IP. */ sources?: pulumi.Input<pulumi.Input<inputs.ipam.IpSource>[]>; /** * The tags associated with the IP. */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * Date and time of IP's last update (RFC 3339 format). */ updatedAt?: pulumi.Input<string>; /** * The zone of the IP. */ zone?: pulumi.Input<string>; } /** * The set of arguments for constructing a Ip resource. */ export interface IpArgs { /** * Request a specific IP in the requested source pool */ address?: pulumi.Input<string>; /** * The custom resource in which to book the IP */ customResources?: pulumi.Input<pulumi.Input<inputs.ipam.IpCustomResource>[]>; /** * Defines whether to request an IPv6 address instead of IPv4. */ isIpv6?: pulumi.Input<boolean>; /** * `projectId`) The ID of the Project the IP is associated with. */ projectId?: pulumi.Input<string>; /** * `region`) The region of the IP. */ region?: pulumi.Input<string>; /** * The source in which to book the IP. */ sources: pulumi.Input<pulumi.Input<inputs.ipam.IpSource>[]>; /** * The tags associated with the IP. */ tags?: pulumi.Input<pulumi.Input<string>[]>; }