getFacility

Provides an Equinix Metal facility datasource.

Example Usage

using Pulumi;
using EquinixMetal = Pulumi.EquinixMetal;

class MyStack : Stack
{
    public MyStack()
    {
        var ny5 = Output.Create(EquinixMetal.GetFacility.InvokeAsync(new EquinixMetal.GetFacilityArgs
        {
            Code = "ny5",
        }));
        this.Id = ny5.Apply(ny5 => ny5.Id);
    }

    [Output("id")]
    public Output<string> Id { get; set; }
}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ny5, err := equinix - metal.GetFacility(ctx, &equinix-metal.GetFacilityArgs{
			Code: "ny5",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("id", ny5.Id)
		return nil
	})
}
import pulumi
import pulumi_equinix_metal as equinix_metal

ny5 = equinix_metal.get_facility(code="ny5")
pulumi.export("id", ny5.id)
import * as pulumi from "@pulumi/pulumi";
import * as equinix_metal from "@pulumi/equinix-metal";

const ny5 = equinix_metal.getFacility({
    code: "ny5",
});
export const id = ny5.then(ny5 => ny5.id);

Using getFacility

function getFacility(args: GetFacilityArgs, opts?: InvokeOptions): Promise<GetFacilityResult>
def get_facility(code: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetFacilityResult
func GetFacility(ctx *Context, args *GetFacilityArgs, opts ...InvokeOption) (*GetFacilityResult, error)

Note: This function is named GetFacility in the Go SDK.

public static class GetFacility {
    public static Task<GetFacilityResult> InvokeAsync(GetFacilityArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Code string
The facility code
Code string
The facility code
code string
The facility code
code str
The facility code

getFacility Result

The following output properties are available:

Code string
Features List<string>
The features of the facility
Id string
The provider-assigned unique ID for this managed resource.
Metro string
The metro code the facility is part of
Name string
The name of the facility
Code string
Features []string
The features of the facility
Id string
The provider-assigned unique ID for this managed resource.
Metro string
The metro code the facility is part of
Name string
The name of the facility
code string
features string[]
The features of the facility
id string
The provider-assigned unique ID for this managed resource.
metro string
The metro code the facility is part of
name string
The name of the facility
code str
features Sequence[str]
The features of the facility
id str
The provider-assigned unique ID for this managed resource.
metro str
The metro code the facility is part of
name str
The name of the facility

Package Details

Repository
https://github.com/pulumi/pulumi-equinix-metal
License
Apache-2.0
Notes
This Pulumi package is based on the metal Terraform Provider.