equinix-metal logo
Equinix Metal v3.2.1, Dec 30 21

equinix-metal.getGateway

Explore with Pulumi AI

Use this datasource to retrieve 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 = Output.Create(EquinixMetal.GetGateway.InvokeAsync(new EquinixMetal.GetGatewayArgs
        {
            GatewayId = local.Gateway_id,
        }));
    }

}
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 {
		_, 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.LookupGateway(ctx, &GetGatewayArgs{
			GatewayId: local.Gateway_id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

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.get_gateway(gateway_id=local["gateway_id"])
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 = equinix_metal.getGateway({
    gatewayId: local.gateway_id,
});

Coming soon!

Using getGateway

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getGateway(args: GetGatewayArgs, opts?: InvokeOptions): Promise<GetGatewayResult>
function getGatewayOutput(args: GetGatewayOutputArgs, opts?: InvokeOptions): Output<GetGatewayResult>
def get_gateway(gateway_id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetGatewayResult
def get_gateway_output(gateway_id: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetGatewayResult]
func LookupGateway(ctx *Context, args *LookupGatewayArgs, opts ...InvokeOption) (*LookupGatewayResult, error)
func LookupGatewayOutput(ctx *Context, args *LookupGatewayOutputArgs, opts ...InvokeOption) LookupGatewayResultOutput

> Note: This function is named LookupGateway in the Go SDK.

public static class GetGateway 
{
    public static Task<GetGatewayResult> InvokeAsync(GetGatewayArgs args, InvokeOptions? opts = null)
    public static Output<GetGatewayResult> Invoke(GetGatewayInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetGatewayResult> getGateway(GetGatewayArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: equinix-metal:index/getGateway:getGateway
  arguments:
    # arguments dictionary

The following arguments are supported:

GatewayId string

UUID of the metal gateway resource to retrieve

GatewayId string

UUID of the metal gateway resource to retrieve

gatewayId String

UUID of the metal gateway resource to retrieve

gatewayId string

UUID of the metal gateway resource to retrieve

gateway_id str

UUID of the metal gateway resource to retrieve

gatewayId String

UUID of the metal gateway resource to retrieve

getGateway Result

The following output properties are available:

GatewayId string
Id string

The provider-assigned unique ID for this managed resource.

IpReservationId string

UUID of IP reservation block bound to the gateway

PrivateIpv4SubnetSize int

Size of the private IPv4 subnet bound to this metal gateway, one of (8, 16, 32, 64, 128)`

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

GatewayId string
Id string

The provider-assigned unique ID for this managed resource.

IpReservationId string

UUID of IP reservation block bound to the gateway

PrivateIpv4SubnetSize int

Size of the private IPv4 subnet bound to this metal gateway, one of (8, 16, 32, 64, 128)`

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

gatewayId String
id String

The provider-assigned unique ID for this managed resource.

ipReservationId String

UUID of IP reservation block bound to the gateway

privateIpv4SubnetSize Integer

Size of the private IPv4 subnet bound to this metal gateway, one of (8, 16, 32, 64, 128)`

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

gatewayId string
id string

The provider-assigned unique ID for this managed resource.

ipReservationId string

UUID of IP reservation block bound to the gateway

privateIpv4SubnetSize number

Size of the private IPv4 subnet bound to this metal gateway, one of (8, 16, 32, 64, 128)`

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

gateway_id str
id str

The provider-assigned unique ID for this managed resource.

ip_reservation_id str

UUID of IP reservation block bound to the gateway

private_ipv4_subnet_size int

Size of the private IPv4 subnet bound to this metal gateway, one of (8, 16, 32, 64, 128)`

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

gatewayId String
id String

The provider-assigned unique ID for this managed resource.

ipReservationId String

UUID of IP reservation block bound to the gateway

privateIpv4SubnetSize Number

Size of the private IPv4 subnet bound to this metal gateway, one of (8, 16, 32, 64, 128)`

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.