UNPKG

@cuemby/equinix

Version:

A Pulumi package for creating and managing equinix cloud resources.

295 lines (294 loc) 11.1 kB
import * as pulumi from "@pulumi/pulumi"; /** * Use this resource to associate VLAN with a Dedicated Port from * [Equinix Fabric - software-defined interconnections](https://metal.equinix.com/developers/docs/networking/fabric/#associating-a-vlan-with-a-dedicated-port). * * > VRF features are not generally available. The interfaces related to VRF resources may change ahead of general availability. * * ## Example Usage * * Pick an existing Project and Connection, create a VLAN and use `equinix.MetalVirtualCircuit` * to associate it with a Primary Port of the Connection. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as equinix from "@cuemby/equinix"; * import * as equinix from "@pulumi/equinix"; * * const projectId = "52000fb2-ee46-4673-93a8-de2c2bdba33c"; * const connId = "73f12f29-3e19-43a0-8e90-ae81580db1e0"; * const testGetMetalConnection = equinix.GetMetalConnection({ * connectionId: connId, * }); * const testMetalVlan = new equinix.MetalVlan("testMetalVlan", { * projectId: projectId, * metro: testGetMetalConnection.then(testGetMetalConnection => testGetMetalConnection.metro), * }); * const testMetalVirtualCircuit = new equinix.MetalVirtualCircuit("testMetalVirtualCircuit", { * connectionId: connId, * projectId: projectId, * portId: testGetMetalConnection.then(testGetMetalConnection => testGetMetalConnection.ports?[0]?.id), * vlanId: testMetalVlan.id, * nniVlan: 1056, * }); * ``` * * ## Import * * This resource can be imported using an existing Virtual Circuit ID * * ```sh * $ pulumi import equinix:index/metalVirtualCircuit:MetalVirtualCircuit equinix_metal_virtual_circuit {existing_id} * ``` */ export declare class MetalVirtualCircuit extends pulumi.CustomResource { /** * Get an existing MetalVirtualCircuit 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?: MetalVirtualCircuitState, opts?: pulumi.CustomResourceOptions): MetalVirtualCircuit; /** * Returns true if the given object is an instance of MetalVirtualCircuit. 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 MetalVirtualCircuit; /** * UUID of Connection where the VC is scoped to. */ readonly connectionId: pulumi.Output<string>; /** * The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet. */ readonly customerIp: pulumi.Output<string | undefined>; /** * Description for the Virtual Circuit resource. */ readonly description: pulumi.Output<string | undefined>; /** * The password that can be set for the VRF BGP peer */ readonly md5: pulumi.Output<string | undefined>; /** * The Metal IP address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the subnet. */ readonly metalIp: pulumi.Output<string | undefined>; /** * Name of the Virtual Circuit resource. */ readonly name: pulumi.Output<string>; /** * Equinix Metal network-to-network VLAN ID. */ readonly nniVlan: pulumi.Output<number | undefined>; /** * NNI VLAN parameters, see the [documentation for Equinix Fabric](https://metal.equinix.com/developers/docs/networking/fabric/). */ readonly nniVnid: pulumi.Output<number>; /** * The BGP ASN of the peer. The same ASN may be the used across several VCs, but it cannot be the same as the localAsn of the VRF. */ readonly peerAsn: pulumi.Output<number | undefined>; /** * UUID of the Connection Port where the VC is scoped to. */ readonly portId: pulumi.Output<string>; /** * UUID of the Project where the VC is scoped to. */ readonly projectId: pulumi.Output<string>; /** * Speed of the Virtual Circuit resource. */ readonly speed: pulumi.Output<string>; /** * Status of the virtal circuit. */ readonly status: pulumi.Output<string>; /** * A subnet from one of the IP * blocks associated with the VRF that we will help create an IP reservation for. Can only be either a /30 or /31. * * For a /31 block, it will only have two IP addresses, which will be used for * the metalIp and customer_ip. * * For a /30 block, it will have four IP addresses, but the first and last IP addresses are not usable. We will default to the first usable IP address for the metal_ip. */ readonly subnet: pulumi.Output<string | undefined>; /** * Tags for the Virtual Circuit resource. */ readonly tags: pulumi.Output<string[] | undefined>; /** * UUID of the VLAN to associate. */ readonly vlanId: pulumi.Output<string | undefined>; /** * VNID VLAN parameter, see the [documentation for Equinix Fabric](https://metal.equinix.com/developers/docs/networking/fabric/). */ readonly vnid: pulumi.Output<number>; /** * UUID of the VRF to associate. */ readonly vrfId: pulumi.Output<string | undefined>; /** * Create a MetalVirtualCircuit 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: MetalVirtualCircuitArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering MetalVirtualCircuit resources. */ export interface MetalVirtualCircuitState { /** * UUID of Connection where the VC is scoped to. */ connectionId?: pulumi.Input<string>; /** * The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet. */ customerIp?: pulumi.Input<string>; /** * Description for the Virtual Circuit resource. */ description?: pulumi.Input<string>; /** * The password that can be set for the VRF BGP peer */ md5?: pulumi.Input<string>; /** * The Metal IP address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the subnet. */ metalIp?: pulumi.Input<string>; /** * Name of the Virtual Circuit resource. */ name?: pulumi.Input<string>; /** * Equinix Metal network-to-network VLAN ID. */ nniVlan?: pulumi.Input<number>; /** * NNI VLAN parameters, see the [documentation for Equinix Fabric](https://metal.equinix.com/developers/docs/networking/fabric/). */ nniVnid?: pulumi.Input<number>; /** * The BGP ASN of the peer. The same ASN may be the used across several VCs, but it cannot be the same as the localAsn of the VRF. */ peerAsn?: pulumi.Input<number>; /** * UUID of the Connection Port where the VC is scoped to. */ portId?: pulumi.Input<string>; /** * UUID of the Project where the VC is scoped to. */ projectId?: pulumi.Input<string>; /** * Speed of the Virtual Circuit resource. */ speed?: pulumi.Input<string>; /** * Status of the virtal circuit. */ status?: pulumi.Input<string>; /** * A subnet from one of the IP * blocks associated with the VRF that we will help create an IP reservation for. Can only be either a /30 or /31. * * For a /31 block, it will only have two IP addresses, which will be used for * the metalIp and customer_ip. * * For a /30 block, it will have four IP addresses, but the first and last IP addresses are not usable. We will default to the first usable IP address for the metal_ip. */ subnet?: pulumi.Input<string>; /** * Tags for the Virtual Circuit resource. */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * UUID of the VLAN to associate. */ vlanId?: pulumi.Input<string>; /** * VNID VLAN parameter, see the [documentation for Equinix Fabric](https://metal.equinix.com/developers/docs/networking/fabric/). */ vnid?: pulumi.Input<number>; /** * UUID of the VRF to associate. */ vrfId?: pulumi.Input<string>; } /** * The set of arguments for constructing a MetalVirtualCircuit resource. */ export interface MetalVirtualCircuitArgs { /** * UUID of Connection where the VC is scoped to. */ connectionId: pulumi.Input<string>; /** * The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet. */ customerIp?: pulumi.Input<string>; /** * Description for the Virtual Circuit resource. */ description?: pulumi.Input<string>; /** * The password that can be set for the VRF BGP peer */ md5?: pulumi.Input<string>; /** * The Metal IP address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the subnet. */ metalIp?: pulumi.Input<string>; /** * Name of the Virtual Circuit resource. */ name?: pulumi.Input<string>; /** * Equinix Metal network-to-network VLAN ID. */ nniVlan?: pulumi.Input<number>; /** * The BGP ASN of the peer. The same ASN may be the used across several VCs, but it cannot be the same as the localAsn of the VRF. */ peerAsn?: pulumi.Input<number>; /** * UUID of the Connection Port where the VC is scoped to. */ portId: pulumi.Input<string>; /** * UUID of the Project where the VC is scoped to. */ projectId: pulumi.Input<string>; /** * Speed of the Virtual Circuit resource. */ speed?: pulumi.Input<string>; /** * A subnet from one of the IP * blocks associated with the VRF that we will help create an IP reservation for. Can only be either a /30 or /31. * * For a /31 block, it will only have two IP addresses, which will be used for * the metalIp and customer_ip. * * For a /30 block, it will have four IP addresses, but the first and last IP addresses are not usable. We will default to the first usable IP address for the metal_ip. */ subnet?: pulumi.Input<string>; /** * Tags for the Virtual Circuit resource. */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * UUID of the VLAN to associate. */ vlanId?: pulumi.Input<string>; /** * UUID of the VRF to associate. */ vrfId?: pulumi.Input<string>; }