1. Packages
  2. Equinix
  3. API Docs
  4. metal
  5. Gateway
Equinix v0.8.0 published on Tuesday, Apr 2, 2024 by Equinix

equinix.metal.Gateway

Explore with Pulumi AI

equinix logo
Equinix v0.8.0 published on Tuesday, Apr 2, 2024 by Equinix

    Use this resource to create Metal Gateway resources in Equinix Metal.

    VRF features are not generally available. The interfaces related to VRF resources may change ahead of general availability.

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Equinix = Pulumi.Equinix;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var projectId = config.Require("projectId");
        var vlanId = config.Require("vlanId");
        var gateway = new Equinix.Metal.Gateway("gateway", new()
        {
            ProjectId = projectId,
            VlanId = vlanId,
            PrivateIpv4SubnetSize = 8,
        });
    
        return new Dictionary<string, object?>
        {
            ["gatewayState"] = gateway.State,
        };
    });
    
    package main
    
    import (
    	"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		projectId := cfg.Require("projectId")
    		vlanId := cfg.Require("vlanId")
    		gateway, err := metal.NewGateway(ctx, "gateway", &metal.GatewayArgs{
    			ProjectId:             pulumi.String(projectId),
    			VlanId:                pulumi.String(vlanId),
    			PrivateIpv4SubnetSize: pulumi.Int(8),
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("gatewayState", gateway.State)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.equinix.pulumi.metal.Gateway;
    import com.equinix.pulumi.metal.GatewayArgs;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var projectId = config.get("projectId").get();
            final var vlanId = config.get("vlanId").get();
            var gateway = new Gateway("gateway", GatewayArgs.builder()        
                .projectId(projectId)
                .vlanId(vlanId)
                .privateIpv4SubnetSize(8)
                .build());
    
            ctx.export("gatewayState", gateway.state());
        }
    }
    
    import pulumi
    import pulumi_equinix as equinix
    
    config = pulumi.Config()
    project_id = config.require("projectId")
    vlan_id = config.require("vlanId")
    gateway = equinix.metal.Gateway("gateway",
        project_id=project_id,
        vlan_id=vlan_id,
        private_ipv4_subnet_size=8)
    pulumi.export("gatewayState", gateway.state)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as equinix from "@equinix-labs/pulumi-equinix";
    
    const config = new pulumi.Config();
    const projectId = config.require("projectId");
    const vlanId = config.require("vlanId");
    const gateway = new equinix.metal.Gateway("gateway", {
        projectId: projectId,
        vlanId: vlanId,
        privateIpv4SubnetSize: 8,
    });
    export const gatewayState = gateway.state;
    
    config:
      projectId:
        type: string
      vlanId:
        type: string
    resources:
      gateway:
        type: equinix:metal:Gateway
        properties:
          projectId: ${projectId}
          vlanId: ${vlanId}
          privateIpv4SubnetSize: 8
    outputs:
      gatewayState: ${gateway.state}
    

    Create Gateway Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Gateway(name: string, args: GatewayArgs, opts?: CustomResourceOptions);
    @overload
    def Gateway(resource_name: str,
                args: GatewayArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Gateway(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                project_id: Optional[str] = None,
                vlan_id: Optional[str] = None,
                ip_reservation_id: Optional[str] = None,
                private_ipv4_subnet_size: Optional[int] = None,
                timeouts: Optional[GatewayTimeoutsArgs] = None)
    func NewGateway(ctx *Context, name string, args GatewayArgs, opts ...ResourceOption) (*Gateway, error)
    public Gateway(string name, GatewayArgs args, CustomResourceOptions? opts = null)
    public Gateway(String name, GatewayArgs args)
    public Gateway(String name, GatewayArgs args, CustomResourceOptions options)
    
    type: equinix:metal:Gateway
    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 GatewayArgs
    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 GatewayArgs
    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 GatewayArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GatewayArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var gatewayResource = new Equinix.Metal.Gateway("gatewayResource", new()
    {
        ProjectId = "string",
        VlanId = "string",
        IpReservationId = "string",
        PrivateIpv4SubnetSize = 0,
        Timeouts = new Equinix.Metal.Inputs.GatewayTimeoutsArgs
        {
            Delete = "string",
        },
    });
    
    example, err := metal.NewGateway(ctx, "gatewayResource", &metal.GatewayArgs{
    	ProjectId:             pulumi.String("string"),
    	VlanId:                pulumi.String("string"),
    	IpReservationId:       pulumi.String("string"),
    	PrivateIpv4SubnetSize: pulumi.Int(0),
    	Timeouts: &metal.GatewayTimeoutsArgs{
    		Delete: pulumi.String("string"),
    	},
    })
    
    var gatewayResource = new Gateway("gatewayResource", GatewayArgs.builder()        
        .projectId("string")
        .vlanId("string")
        .ipReservationId("string")
        .privateIpv4SubnetSize(0)
        .timeouts(GatewayTimeoutsArgs.builder()
            .delete("string")
            .build())
        .build());
    
    gateway_resource = equinix.metal.Gateway("gatewayResource",
        project_id="string",
        vlan_id="string",
        ip_reservation_id="string",
        private_ipv4_subnet_size=0,
        timeouts=equinix.metal.GatewayTimeoutsArgs(
            delete="string",
        ))
    
    const gatewayResource = new equinix.metal.Gateway("gatewayResource", {
        projectId: "string",
        vlanId: "string",
        ipReservationId: "string",
        privateIpv4SubnetSize: 0,
        timeouts: {
            "delete": "string",
        },
    });
    
    type: equinix:metal:Gateway
    properties:
        ipReservationId: string
        privateIpv4SubnetSize: 0
        projectId: string
        timeouts:
            delete: string
        vlanId: string
    

    Gateway 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 Gateway resource accepts the following input properties:

    ProjectId string
    UUID of the project where the gateway is scoped to.
    VlanId string
    UUID of the VLAN where the gateway is scoped to.
    IpReservationId string
    UUID of Public or VRF IP Reservation to associate with the gateway, the reservation must be in the same metro as the VLAN, conflicts with private_ipv4_subnet_size.
    PrivateIpv4SubnetSize int
    Size of the private IPv4 subnet to create for this metal gateway, must be one of 8, 16, 32, 64, 128. Conflicts with ip_reservation_id.
    Timeouts GatewayTimeouts
    ProjectId string
    UUID of the project where the gateway is scoped to.
    VlanId string
    UUID of the VLAN where the gateway is scoped to.
    IpReservationId string
    UUID of Public or VRF IP Reservation to associate with the gateway, the reservation must be in the same metro as the VLAN, conflicts with private_ipv4_subnet_size.
    PrivateIpv4SubnetSize int
    Size of the private IPv4 subnet to create for this metal gateway, must be one of 8, 16, 32, 64, 128. Conflicts with ip_reservation_id.
    Timeouts GatewayTimeoutsArgs
    projectId String
    UUID of the project where the gateway is scoped to.
    vlanId String
    UUID of the VLAN where the gateway is scoped to.
    ipReservationId String
    UUID of Public or VRF IP Reservation to associate with the gateway, the reservation must be in the same metro as the VLAN, conflicts with private_ipv4_subnet_size.
    privateIpv4SubnetSize Integer
    Size of the private IPv4 subnet to create for this metal gateway, must be one of 8, 16, 32, 64, 128. Conflicts with ip_reservation_id.
    timeouts GatewayTimeouts
    projectId string
    UUID of the project where the gateway is scoped to.
    vlanId string
    UUID of the VLAN where the gateway is scoped to.
    ipReservationId string
    UUID of Public or VRF IP Reservation to associate with the gateway, the reservation must be in the same metro as the VLAN, conflicts with private_ipv4_subnet_size.
    privateIpv4SubnetSize number
    Size of the private IPv4 subnet to create for this metal gateway, must be one of 8, 16, 32, 64, 128. Conflicts with ip_reservation_id.
    timeouts GatewayTimeouts
    project_id str
    UUID of the project where the gateway is scoped to.
    vlan_id str
    UUID of the VLAN where the gateway is scoped to.
    ip_reservation_id str
    UUID of Public or VRF IP Reservation to associate with the gateway, the reservation must be in the same metro as the VLAN, conflicts with private_ipv4_subnet_size.
    private_ipv4_subnet_size int
    Size of the private IPv4 subnet to create for this metal gateway, must be one of 8, 16, 32, 64, 128. Conflicts with ip_reservation_id.
    timeouts GatewayTimeoutsArgs
    projectId String
    UUID of the project where the gateway is scoped to.
    vlanId String
    UUID of the VLAN where the gateway is scoped to.
    ipReservationId String
    UUID of Public or VRF IP Reservation to associate with the gateway, the reservation must be in the same metro as the VLAN, conflicts with private_ipv4_subnet_size.
    privateIpv4SubnetSize Number
    Size of the private IPv4 subnet to create for this metal gateway, must be one of 8, 16, 32, 64, 128. Conflicts with ip_reservation_id.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Gateway resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    Status of the gateway resource.
    VrfId string
    UUID of the VRF associated with the IP Reservation
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    Status of the gateway resource.
    VrfId string
    UUID of the VRF associated with the IP Reservation
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    Status of the gateway resource.
    vrfId String
    UUID of the VRF associated with the IP Reservation
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    Status of the gateway resource.
    vrfId string
    UUID of the VRF associated with the IP Reservation
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    Status of the gateway resource.
    vrf_id str
    UUID of the VRF associated with the IP Reservation
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    Status of the gateway resource.
    vrfId String
    UUID of the VRF associated with the IP Reservation

    Look up Existing Gateway Resource

    Get an existing Gateway 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?: GatewayState, opts?: CustomResourceOptions): Gateway
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ip_reservation_id: Optional[str] = None,
            private_ipv4_subnet_size: Optional[int] = None,
            project_id: Optional[str] = None,
            state: Optional[str] = None,
            timeouts: Optional[GatewayTimeoutsArgs] = None,
            vlan_id: Optional[str] = None,
            vrf_id: Optional[str] = None) -> Gateway
    func GetGateway(ctx *Context, name string, id IDInput, state *GatewayState, opts ...ResourceOption) (*Gateway, error)
    public static Gateway Get(string name, Input<string> id, GatewayState? state, CustomResourceOptions? opts = null)
    public static Gateway get(String name, Output<String> id, GatewayState 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.
    The following state arguments are supported:
    IpReservationId string
    UUID of Public or VRF IP Reservation to associate with the gateway, the reservation must be in the same metro as the VLAN, conflicts with private_ipv4_subnet_size.
    PrivateIpv4SubnetSize int
    Size of the private IPv4 subnet to create for this metal gateway, must be one of 8, 16, 32, 64, 128. Conflicts with ip_reservation_id.
    ProjectId string
    UUID of the project where the gateway is scoped to.
    State string
    Status of the gateway resource.
    Timeouts GatewayTimeouts
    VlanId string
    UUID of the VLAN where the gateway is scoped to.
    VrfId string
    UUID of the VRF associated with the IP Reservation
    IpReservationId string
    UUID of Public or VRF IP Reservation to associate with the gateway, the reservation must be in the same metro as the VLAN, conflicts with private_ipv4_subnet_size.
    PrivateIpv4SubnetSize int
    Size of the private IPv4 subnet to create for this metal gateway, must be one of 8, 16, 32, 64, 128. Conflicts with ip_reservation_id.
    ProjectId string
    UUID of the project where the gateway is scoped to.
    State string
    Status of the gateway resource.
    Timeouts GatewayTimeoutsArgs
    VlanId string
    UUID of the VLAN where the gateway is scoped to.
    VrfId string
    UUID of the VRF associated with the IP Reservation
    ipReservationId String
    UUID of Public or VRF IP Reservation to associate with the gateway, the reservation must be in the same metro as the VLAN, conflicts with private_ipv4_subnet_size.
    privateIpv4SubnetSize Integer
    Size of the private IPv4 subnet to create for this metal gateway, must be one of 8, 16, 32, 64, 128. Conflicts with ip_reservation_id.
    projectId String
    UUID of the project where the gateway is scoped to.
    state String
    Status of the gateway resource.
    timeouts GatewayTimeouts
    vlanId String
    UUID of the VLAN where the gateway is scoped to.
    vrfId String
    UUID of the VRF associated with the IP Reservation
    ipReservationId string
    UUID of Public or VRF IP Reservation to associate with the gateway, the reservation must be in the same metro as the VLAN, conflicts with private_ipv4_subnet_size.
    privateIpv4SubnetSize number
    Size of the private IPv4 subnet to create for this metal gateway, must be one of 8, 16, 32, 64, 128. Conflicts with ip_reservation_id.
    projectId string
    UUID of the project where the gateway is scoped to.
    state string
    Status of the gateway resource.
    timeouts GatewayTimeouts
    vlanId string
    UUID of the VLAN where the gateway is scoped to.
    vrfId string
    UUID of the VRF associated with the IP Reservation
    ip_reservation_id str
    UUID of Public or VRF IP Reservation to associate with the gateway, the reservation must be in the same metro as the VLAN, conflicts with private_ipv4_subnet_size.
    private_ipv4_subnet_size int
    Size of the private IPv4 subnet to create for this metal gateway, must be one of 8, 16, 32, 64, 128. Conflicts with ip_reservation_id.
    project_id str
    UUID of the project where the gateway is scoped to.
    state str
    Status of the gateway resource.
    timeouts GatewayTimeoutsArgs
    vlan_id str
    UUID of the VLAN where the gateway is scoped to.
    vrf_id str
    UUID of the VRF associated with the IP Reservation
    ipReservationId String
    UUID of Public or VRF IP Reservation to associate with the gateway, the reservation must be in the same metro as the VLAN, conflicts with private_ipv4_subnet_size.
    privateIpv4SubnetSize Number
    Size of the private IPv4 subnet to create for this metal gateway, must be one of 8, 16, 32, 64, 128. Conflicts with ip_reservation_id.
    projectId String
    UUID of the project where the gateway is scoped to.
    state String
    Status of the gateway resource.
    timeouts Property Map
    vlanId String
    UUID of the VLAN where the gateway is scoped to.
    vrfId String
    UUID of the VRF associated with the IP Reservation

    Supporting Types

    GatewayTimeouts, GatewayTimeoutsArgs

    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    delete str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.

    Package Details

    Repository
    equinix equinix/pulumi-equinix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the equinix Terraform Provider.
    equinix logo
    Equinix v0.8.0 published on Tuesday, Apr 2, 2024 by Equinix