1. Packages
  2. Equinix
  3. API Docs
  4. metal
  5. Vrf
Equinix v0.11.2 published on Wednesday, Jun 26, 2024 by Equinix

equinix.metal.Vrf

Explore with Pulumi AI

equinix logo
Equinix v0.11.2 published on Wednesday, Jun 26, 2024 by Equinix

    Use this resource to manage a VRF.

    See the Virtual Routing and Forwarding documentation for product details and API reference material.

    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 metro = config.Get("metro") ?? "DA";
        var vrf = new Equinix.Metal.Vrf("vrf", new()
        {
            Description = "VRF with ASN 65000 and a pool of address space",
            Name = "example-vrf",
            Metro = metro,
            LocalAsn = 65000,
            IpRanges = new[]
            {
                "192.168.100.0/25",
                "192.168.200.0/25",
            },
            ProjectId = projectId,
        });
    
        return new Dictionary<string, object?>
        {
            ["vrfId"] = vrf.Id,
        };
    });
    
    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")
    		metro := "DA"
    		if param := cfg.Get("metro"); param != "" {
    			metro = param
    		}
    		vrf, err := metal.NewVrf(ctx, "vrf", &metal.VrfArgs{
    			Description: pulumi.String("VRF with ASN 65000 and a pool of address space"),
    			Name:        pulumi.String("example-vrf"),
    			Metro:       pulumi.String(metro),
    			LocalAsn:    pulumi.Int(65000),
    			IpRanges: pulumi.StringArray{
    				pulumi.String("192.168.100.0/25"),
    				pulumi.String("192.168.200.0/25"),
    			},
    			ProjectId: pulumi.String(projectId),
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("vrfId", vrf.ID())
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.equinix.pulumi.metal.Vrf;
    import com.equinix.pulumi.metal.VrfArgs;
    
    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 metro = config.get("metro").orElse("DA");
            var vrf = new Vrf("vrf", VrfArgs.builder()        
                .description("VRF with ASN 65000 and a pool of address space")
                .name("example-vrf")
                .metro(metro)
                .localAsn(65000)
                .ipRanges(            
                    "192.168.100.0/25",
                    "192.168.200.0/25")
                .projectId(projectId)
                .build());
    
            ctx.export("vrfId", vrf.id());
        }
    }
    
    import pulumi
    import pulumi_equinix as equinix
    
    config = pulumi.Config()
    project_id = config.require("projectId")
    metro = config.get("metro")
    if metro is None:
        metro = "DA"
    vrf = equinix.metal.Vrf("vrf",
        description="VRF with ASN 65000 and a pool of address space",
        name="example-vrf",
        metro=metro,
        local_asn=65000,
        ip_ranges=[
            "192.168.100.0/25",
            "192.168.200.0/25",
        ],
        project_id=project_id)
    pulumi.export("vrfId", vrf.id)
    
    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 metro = config.get("metro") || "DA";
    const vrf = new equinix.metal.Vrf("vrf", {
        description: "VRF with ASN 65000 and a pool of address space",
        name: "example-vrf",
        metro: metro,
        localAsn: 65000,
        ipRanges: [
            "192.168.100.0/25",
            "192.168.200.0/25",
        ],
        projectId: projectId,
    });
    export const vrfId = vrf.id;
    
    config:
      projectId:
        type: string
      metro:
        type: string
        default: DA
    resources:
      vrf:
        type: equinix:metal:Vrf
        properties:
          description: VRF with ASN 65000 and a pool of address space
          name: example-vrf
          metro: ${metro}
          localAsn: "65000"
          ipRanges:
          - 192.168.100.0/25
          - 192.168.200.0/25
          projectId: ${projectId}
    outputs:
      vrfId: ${vrf.id}
    

    Create Vrf Resource

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

    Constructor syntax

    new Vrf(name: string, args: VrfArgs, opts?: CustomResourceOptions);
    @overload
    def Vrf(resource_name: str,
            args: VrfArgs,
            opts: Optional[ResourceOptions] = None)
    
    @overload
    def Vrf(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            metro: Optional[str] = None,
            project_id: Optional[str] = None,
            description: Optional[str] = None,
            ip_ranges: Optional[Sequence[str]] = None,
            local_asn: Optional[int] = None,
            name: Optional[str] = None)
    func NewVrf(ctx *Context, name string, args VrfArgs, opts ...ResourceOption) (*Vrf, error)
    public Vrf(string name, VrfArgs args, CustomResourceOptions? opts = null)
    public Vrf(String name, VrfArgs args)
    public Vrf(String name, VrfArgs args, CustomResourceOptions options)
    
    type: equinix:metal:Vrf
    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 VrfArgs
    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 VrfArgs
    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 VrfArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VrfArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VrfArgs
    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 vrfResource = new Equinix.Metal.Vrf("vrfResource", new()
    {
        Metro = "string",
        ProjectId = "string",
        Description = "string",
        IpRanges = new[]
        {
            "string",
        },
        LocalAsn = 0,
        Name = "string",
    });
    
    example, err := metal.NewVrf(ctx, "vrfResource", &metal.VrfArgs{
    	Metro:       pulumi.String("string"),
    	ProjectId:   pulumi.String("string"),
    	Description: pulumi.String("string"),
    	IpRanges: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	LocalAsn: pulumi.Int(0),
    	Name:     pulumi.String("string"),
    })
    
    var vrfResource = new Vrf("vrfResource", VrfArgs.builder()
        .metro("string")
        .projectId("string")
        .description("string")
        .ipRanges("string")
        .localAsn(0)
        .name("string")
        .build());
    
    vrf_resource = equinix.metal.Vrf("vrfResource",
        metro="string",
        project_id="string",
        description="string",
        ip_ranges=["string"],
        local_asn=0,
        name="string")
    
    const vrfResource = new equinix.metal.Vrf("vrfResource", {
        metro: "string",
        projectId: "string",
        description: "string",
        ipRanges: ["string"],
        localAsn: 0,
        name: "string",
    });
    
    type: equinix:metal:Vrf
    properties:
        description: string
        ipRanges:
            - string
        localAsn: 0
        metro: string
        name: string
        projectId: string
    

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

    Metro string
    Metro ID or Code where the VRF will be deployed.
    ProjectId string
    Project ID where the VRF will be deployed.
    Description string
    Description of the VRF.
    IpRanges List<string>
    All IPv4 and IPv6 Ranges that will be available to BGP Peers. IPv4 addresses must be /8 or smaller with a minimum size of /29. IPv6 must be /56 or smaller with a minimum size of /64. Ranges must not overlap other ranges within the VRF.
    LocalAsn int
    The 4-byte ASN set on the VRF.
    Name string
    User-supplied name of the VRF, unique to the project
    Metro string
    Metro ID or Code where the VRF will be deployed.
    ProjectId string
    Project ID where the VRF will be deployed.
    Description string
    Description of the VRF.
    IpRanges []string
    All IPv4 and IPv6 Ranges that will be available to BGP Peers. IPv4 addresses must be /8 or smaller with a minimum size of /29. IPv6 must be /56 or smaller with a minimum size of /64. Ranges must not overlap other ranges within the VRF.
    LocalAsn int
    The 4-byte ASN set on the VRF.
    Name string
    User-supplied name of the VRF, unique to the project
    metro String
    Metro ID or Code where the VRF will be deployed.
    projectId String
    Project ID where the VRF will be deployed.
    description String
    Description of the VRF.
    ipRanges List<String>
    All IPv4 and IPv6 Ranges that will be available to BGP Peers. IPv4 addresses must be /8 or smaller with a minimum size of /29. IPv6 must be /56 or smaller with a minimum size of /64. Ranges must not overlap other ranges within the VRF.
    localAsn Integer
    The 4-byte ASN set on the VRF.
    name String
    User-supplied name of the VRF, unique to the project
    metro string
    Metro ID or Code where the VRF will be deployed.
    projectId string
    Project ID where the VRF will be deployed.
    description string
    Description of the VRF.
    ipRanges string[]
    All IPv4 and IPv6 Ranges that will be available to BGP Peers. IPv4 addresses must be /8 or smaller with a minimum size of /29. IPv6 must be /56 or smaller with a minimum size of /64. Ranges must not overlap other ranges within the VRF.
    localAsn number
    The 4-byte ASN set on the VRF.
    name string
    User-supplied name of the VRF, unique to the project
    metro str
    Metro ID or Code where the VRF will be deployed.
    project_id str
    Project ID where the VRF will be deployed.
    description str
    Description of the VRF.
    ip_ranges Sequence[str]
    All IPv4 and IPv6 Ranges that will be available to BGP Peers. IPv4 addresses must be /8 or smaller with a minimum size of /29. IPv6 must be /56 or smaller with a minimum size of /64. Ranges must not overlap other ranges within the VRF.
    local_asn int
    The 4-byte ASN set on the VRF.
    name str
    User-supplied name of the VRF, unique to the project
    metro String
    Metro ID or Code where the VRF will be deployed.
    projectId String
    Project ID where the VRF will be deployed.
    description String
    Description of the VRF.
    ipRanges List<String>
    All IPv4 and IPv6 Ranges that will be available to BGP Peers. IPv4 addresses must be /8 or smaller with a minimum size of /29. IPv6 must be /56 or smaller with a minimum size of /64. Ranges must not overlap other ranges within the VRF.
    localAsn Number
    The 4-byte ASN set on the VRF.
    name String
    User-supplied name of the VRF, unique to the project

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Vrf Resource

    Get an existing Vrf 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?: VrfState, opts?: CustomResourceOptions): Vrf
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            ip_ranges: Optional[Sequence[str]] = None,
            local_asn: Optional[int] = None,
            metro: Optional[str] = None,
            name: Optional[str] = None,
            project_id: Optional[str] = None) -> Vrf
    func GetVrf(ctx *Context, name string, id IDInput, state *VrfState, opts ...ResourceOption) (*Vrf, error)
    public static Vrf Get(string name, Input<string> id, VrfState? state, CustomResourceOptions? opts = null)
    public static Vrf get(String name, Output<String> id, VrfState 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:
    Description string
    Description of the VRF.
    IpRanges List<string>
    All IPv4 and IPv6 Ranges that will be available to BGP Peers. IPv4 addresses must be /8 or smaller with a minimum size of /29. IPv6 must be /56 or smaller with a minimum size of /64. Ranges must not overlap other ranges within the VRF.
    LocalAsn int
    The 4-byte ASN set on the VRF.
    Metro string
    Metro ID or Code where the VRF will be deployed.
    Name string
    User-supplied name of the VRF, unique to the project
    ProjectId string
    Project ID where the VRF will be deployed.
    Description string
    Description of the VRF.
    IpRanges []string
    All IPv4 and IPv6 Ranges that will be available to BGP Peers. IPv4 addresses must be /8 or smaller with a minimum size of /29. IPv6 must be /56 or smaller with a minimum size of /64. Ranges must not overlap other ranges within the VRF.
    LocalAsn int
    The 4-byte ASN set on the VRF.
    Metro string
    Metro ID or Code where the VRF will be deployed.
    Name string
    User-supplied name of the VRF, unique to the project
    ProjectId string
    Project ID where the VRF will be deployed.
    description String
    Description of the VRF.
    ipRanges List<String>
    All IPv4 and IPv6 Ranges that will be available to BGP Peers. IPv4 addresses must be /8 or smaller with a minimum size of /29. IPv6 must be /56 or smaller with a minimum size of /64. Ranges must not overlap other ranges within the VRF.
    localAsn Integer
    The 4-byte ASN set on the VRF.
    metro String
    Metro ID or Code where the VRF will be deployed.
    name String
    User-supplied name of the VRF, unique to the project
    projectId String
    Project ID where the VRF will be deployed.
    description string
    Description of the VRF.
    ipRanges string[]
    All IPv4 and IPv6 Ranges that will be available to BGP Peers. IPv4 addresses must be /8 or smaller with a minimum size of /29. IPv6 must be /56 or smaller with a minimum size of /64. Ranges must not overlap other ranges within the VRF.
    localAsn number
    The 4-byte ASN set on the VRF.
    metro string
    Metro ID or Code where the VRF will be deployed.
    name string
    User-supplied name of the VRF, unique to the project
    projectId string
    Project ID where the VRF will be deployed.
    description str
    Description of the VRF.
    ip_ranges Sequence[str]
    All IPv4 and IPv6 Ranges that will be available to BGP Peers. IPv4 addresses must be /8 or smaller with a minimum size of /29. IPv6 must be /56 or smaller with a minimum size of /64. Ranges must not overlap other ranges within the VRF.
    local_asn int
    The 4-byte ASN set on the VRF.
    metro str
    Metro ID or Code where the VRF will be deployed.
    name str
    User-supplied name of the VRF, unique to the project
    project_id str
    Project ID where the VRF will be deployed.
    description String
    Description of the VRF.
    ipRanges List<String>
    All IPv4 and IPv6 Ranges that will be available to BGP Peers. IPv4 addresses must be /8 or smaller with a minimum size of /29. IPv6 must be /56 or smaller with a minimum size of /64. Ranges must not overlap other ranges within the VRF.
    localAsn Number
    The 4-byte ASN set on the VRF.
    metro String
    Metro ID or Code where the VRF will be deployed.
    name String
    User-supplied name of the VRF, unique to the project
    projectId String
    Project ID where the VRF will be deployed.

    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.11.2 published on Wednesday, Jun 26, 2024 by Equinix