1. Packages
  2. Equinix Metal (Deprecated)
  3. API Docs
  4. Gateway

This package is deprecated. We recommend using the new Equinix package.

Equinix Metal v3.2.1 published on Thursday, Dec 30, 2021 by DEPRECATED

equinix-metal.Gateway

Explore with Pulumi AI

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

Example Usage

using Pulumi;
using EquinixMetal = Pulumi.EquinixMetal;

class MyStack : Stack
{
    public MyStack()
    {
        // Create Metal Gateway for a VLAN with a private IPv4 block with 8 IP addresses
        var testVlan = new EquinixMetal.Vlan("testVlan", new EquinixMetal.VlanArgs
        {
            Description = "test VLAN in SV",
            Metro = "sv",
            ProjectId = local.Project_id,
        });
        var testGateway = new EquinixMetal.Gateway("testGateway", new EquinixMetal.GatewayArgs
        {
            ProjectId = local.Project_id,
            VlanId = testVlan.Id,
            PrivateIpv4SubnetSize = 8,
        });
    }

}
Copy
package main

import (
	"github.com/pulumi/pulumi-equinix-metal/sdk/v3/go/equinix-metal"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		testVlan, err := equinix - metal.NewVlan(ctx, "testVlan", &equinix-metal.VlanArgs{
			Description: pulumi.String("test VLAN in SV"),
			Metro:       pulumi.String("sv"),
			ProjectId:   pulumi.Any(local.Project_id),
		})
		if err != nil {
			return err
		}
		_, err = equinix - metal.NewGateway(ctx, "testGateway", &equinix-metal.GatewayArgs{
			ProjectId:             pulumi.Any(local.Project_id),
			VlanId:                testVlan.ID(),
			PrivateIpv4SubnetSize: pulumi.Int(8),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as equinix_metal from "@pulumi/equinix-metal";

// Create Metal Gateway for a VLAN with a private IPv4 block with 8 IP addresses
const testVlan = new equinix_metal.Vlan("testVlan", {
    description: "test VLAN in SV",
    metro: "sv",
    projectId: local.project_id,
});
const testGateway = new equinix_metal.Gateway("testGateway", {
    projectId: local.project_id,
    vlanId: testVlan.id,
    privateIpv4SubnetSize: 8,
});
Copy
import pulumi
import pulumi_equinix_metal as equinix_metal

# Create Metal Gateway for a VLAN with a private IPv4 block with 8 IP addresses
test_vlan = equinix_metal.Vlan("testVlan",
    description="test VLAN in SV",
    metro="sv",
    project_id=local["project_id"])
test_gateway = equinix_metal.Gateway("testGateway",
    project_id=local["project_id"],
    vlan_id=test_vlan.id,
    private_ipv4_subnet_size=8)
Copy

Coming soon!

using Pulumi;
using EquinixMetal = Pulumi.EquinixMetal;

class MyStack : Stack
{
    public MyStack()
    {
        // Create Metal Gateway for a VLAN and reserved IP address block
        var testVlan = new EquinixMetal.Vlan("testVlan", new EquinixMetal.VlanArgs
        {
            Description = "test VLAN in SV",
            Metro = "sv",
            ProjectId = local.Project_id,
        });
        var testReservedIpBlock = new EquinixMetal.ReservedIpBlock("testReservedIpBlock", new EquinixMetal.ReservedIpBlockArgs
        {
            ProjectId = local.Project_id,
            Metro = "sv",
            Quantity = 2,
        });
        var testGateway = new EquinixMetal.Gateway("testGateway", new EquinixMetal.GatewayArgs
        {
            ProjectId = local.Project_id,
            VlanId = testVlan.Id,
            IpReservationId = testReservedIpBlock.Id,
        });
    }

}
Copy
package main

import (
	"github.com/pulumi/pulumi-equinix-metal/sdk/v3/go/equinix-metal"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		testVlan, err := equinix - metal.NewVlan(ctx, "testVlan", &equinix-metal.VlanArgs{
			Description: pulumi.String("test VLAN in SV"),
			Metro:       pulumi.String("sv"),
			ProjectId:   pulumi.Any(local.Project_id),
		})
		if err != nil {
			return err
		}
		testReservedIpBlock, err := equinix - metal.NewReservedIpBlock(ctx, "testReservedIpBlock", &equinix-metal.ReservedIpBlockArgs{
			ProjectId: pulumi.Any(local.Project_id),
			Metro:     pulumi.String("sv"),
			Quantity:  pulumi.Int(2),
		})
		if err != nil {
			return err
		}
		_, err = equinix - metal.NewGateway(ctx, "testGateway", &equinix-metal.GatewayArgs{
			ProjectId:       pulumi.Any(local.Project_id),
			VlanId:          testVlan.ID(),
			IpReservationId: testReservedIpBlock.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as equinix_metal from "@pulumi/equinix-metal";

// Create Metal Gateway for a VLAN and reserved IP address block
const testVlan = new equinix_metal.Vlan("testVlan", {
    description: "test VLAN in SV",
    metro: "sv",
    projectId: local.project_id,
});
const testReservedIpBlock = new equinix_metal.ReservedIpBlock("testReservedIpBlock", {
    projectId: local.project_id,
    metro: "sv",
    quantity: 2,
});
const testGateway = new equinix_metal.Gateway("testGateway", {
    projectId: local.project_id,
    vlanId: testVlan.id,
    ipReservationId: testReservedIpBlock.id,
});
Copy
import pulumi
import pulumi_equinix_metal as equinix_metal

# Create Metal Gateway for a VLAN and reserved IP address block
test_vlan = equinix_metal.Vlan("testVlan",
    description="test VLAN in SV",
    metro="sv",
    project_id=local["project_id"])
test_reserved_ip_block = equinix_metal.ReservedIpBlock("testReservedIpBlock",
    project_id=local["project_id"],
    metro="sv",
    quantity=2)
test_gateway = equinix_metal.Gateway("testGateway",
    project_id=local["project_id"],
    vlan_id=test_vlan.id,
    ip_reservation_id=test_reserved_ip_block.id)
Copy

Coming soon!

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)
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 This property is required. string
The unique name of the resource.
args This property is required. GatewayArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. GatewayArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. GatewayArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. GatewayArgs
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 gatewayResource = new EquinixMetal.Gateway("gatewayResource", new()
{
    ProjectId = "string",
    VlanId = "string",
    IpReservationId = "string",
    PrivateIpv4SubnetSize = 0,
});
Copy
example, err := equinixmetal.NewGateway(ctx, "gatewayResource", &equinixmetal.GatewayArgs{
	ProjectId:             pulumi.String("string"),
	VlanId:                pulumi.String("string"),
	IpReservationId:       pulumi.String("string"),
	PrivateIpv4SubnetSize: pulumi.Int(0),
})
Copy
var gatewayResource = new Gateway("gatewayResource", GatewayArgs.builder()
    .projectId("string")
    .vlanId("string")
    .ipReservationId("string")
    .privateIpv4SubnetSize(0)
    .build());
Copy
gateway_resource = equinix_metal.Gateway("gatewayResource",
    project_id="string",
    vlan_id="string",
    ip_reservation_id="string",
    private_ipv4_subnet_size=0)
Copy
const gatewayResource = new equinix_metal.Gateway("gatewayResource", {
    projectId: "string",
    vlanId: "string",
    ipReservationId: "string",
    privateIpv4SubnetSize: 0,
});
Copy
type: equinix-metal:Gateway
properties:
    ipReservationId: string
    privateIpv4SubnetSize: 0
    projectId: string
    vlanId: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Gateway resource accepts the following input properties:

ProjectId This property is required. string
UUID of the project where the gateway is scoped to
VlanId This property is required. string
UUID of the VLAN where the gateway is scoped to
IpReservationId string
UUID of IP reservation block to bind to 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 This property is required. string
UUID of the project where the gateway is scoped to
VlanId This property is required. string
UUID of the VLAN where the gateway is scoped to
IpReservationId string
UUID of IP reservation block to bind to 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 This property is required. String
UUID of the project where the gateway is scoped to
vlanId This property is required. String
UUID of the VLAN where the gateway is scoped to
ipReservationId String
UUID of IP reservation block to bind to 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 This property is required. string
UUID of the project where the gateway is scoped to
vlanId This property is required. string
UUID of the VLAN where the gateway is scoped to
ipReservationId string
UUID of IP reservation block to bind to 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
project_id This property is required. str
UUID of the project where the gateway is scoped to
vlan_id This property is required. str
UUID of the VLAN where the gateway is scoped to
ip_reservation_id str
UUID of IP reservation block to bind to 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
projectId This property is required. String
UUID of the project where the gateway is scoped to
vlanId This property is required. String
UUID of the VLAN where the gateway is scoped to
ipReservationId String
UUID of IP reservation block to bind to 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

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
Id string
The provider-assigned unique ID for this managed resource.
State string
Status of the gateway resource
id String
The provider-assigned unique ID for this managed resource.
state String
Status of the gateway resource
id string
The provider-assigned unique ID for this managed resource.
state string
Status of the gateway resource
id str
The provider-assigned unique ID for this managed resource.
state str
Status of the gateway resource
id String
The provider-assigned unique ID for this managed resource.
state String
Status of the gateway resource

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,
        vlan_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)
resources:  _:    type: equinix-metal:Gateway    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 IP reservation block to bind to 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
VlanId string
UUID of the VLAN where the gateway is scoped to
IpReservationId string
UUID of IP reservation block to bind to 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
VlanId string
UUID of the VLAN where the gateway is scoped to
ipReservationId String
UUID of IP reservation block to bind to 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
vlanId String
UUID of the VLAN where the gateway is scoped to
ipReservationId string
UUID of IP reservation block to bind to 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
vlanId string
UUID of the VLAN where the gateway is scoped to
ip_reservation_id str
UUID of IP reservation block to bind to 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
vlan_id str
UUID of the VLAN where the gateway is scoped to
ipReservationId String
UUID of IP reservation block to bind to 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
vlanId String
UUID of the VLAN where the gateway is scoped to

Package Details

Repository
Equinix Metal pulumi/pulumi-equinix-metal
License
Apache-2.0
Notes
This Pulumi package is based on the metal Terraform Provider.