1. Packages
  2. Netbox Provider
  3. API Docs
  4. Vrf
netbox 3.10.0 published on Monday, Apr 14, 2025 by e-breuninger

netbox.Vrf

Explore with Pulumi AI

From the official documentation:

A VRF object in NetBox represents a virtual routing and forwarding (VRF) domain. Each VRF is essentially a separate routing table. VRFs are commonly used to isolate customers or organizations from one another within a network, or to route overlapping address space (e.g. multiple instances of the 10.0.0.0/8 space). Each VRF may be assigned to a specific tenant to aid in organizing the available IP space by customer or internal user.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";

const custAProd = new netbox.Vrf("custAProd", {tags: [
    "customer-a",
    "prod",
]});
Copy
import pulumi
import pulumi_netbox as netbox

cust_a_prod = netbox.Vrf("custAProd", tags=[
    "customer-a",
    "prod",
])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v3/netbox"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := netbox.NewVrf(ctx, "custAProd", &netbox.VrfArgs{
			Tags: pulumi.StringArray{
				pulumi.String("customer-a"),
				pulumi.String("prod"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Netbox = Pulumi.Netbox;

return await Deployment.RunAsync(() => 
{
    var custAProd = new Netbox.Vrf("custAProd", new()
    {
        Tags = new[]
        {
            "customer-a",
            "prod",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.Vrf;
import com.pulumi.netbox.VrfArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var custAProd = new Vrf("custAProd", VrfArgs.builder()
            .tags(            
                "customer-a",
                "prod")
            .build());

    }
}
Copy
resources:
  custAProd:
    type: netbox:Vrf
    properties:
      tags:
        - customer-a
        - prod
Copy

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: Optional[VrfArgs] = None,
        opts: Optional[ResourceOptions] = None)

@overload
def Vrf(resource_name: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        enforce_unique: Optional[bool] = None,
        name: Optional[str] = None,
        rd: Optional[str] = None,
        tags: Optional[Sequence[str]] = None,
        tenant_id: Optional[float] = None,
        vrf_id: Optional[str] = None)
func NewVrf(ctx *Context, name string, args *VrfArgs, opts ...ResourceOption) (*Vrf, error)
public Vrf(string name, VrfArgs? args = null, CustomResourceOptions? opts = null)
public Vrf(String name, VrfArgs args)
public Vrf(String name, VrfArgs args, CustomResourceOptions options)
type: netbox:Vrf
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 VrfArgs
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 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 This property is required. 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 This property is required. 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 This property is required. String
The unique name of the resource.
args This property is required. 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 Netbox.Vrf("vrfResource", new()
{
    Description = "string",
    EnforceUnique = false,
    Name = "string",
    Rd = "string",
    Tags = new[]
    {
        "string",
    },
    TenantId = 0,
    VrfId = "string",
});
Copy
example, err := netbox.NewVrf(ctx, "vrfResource", &netbox.VrfArgs{
Description: pulumi.String("string"),
EnforceUnique: pulumi.Bool(false),
Name: pulumi.String("string"),
Rd: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
TenantId: pulumi.Float64(0),
VrfId: pulumi.String("string"),
})
Copy
var vrfResource = new Vrf("vrfResource", VrfArgs.builder()
    .description("string")
    .enforceUnique(false)
    .name("string")
    .rd("string")
    .tags("string")
    .tenantId(0)
    .vrfId("string")
    .build());
Copy
vrf_resource = netbox.Vrf("vrfResource",
    description="string",
    enforce_unique=False,
    name="string",
    rd="string",
    tags=["string"],
    tenant_id=0,
    vrf_id="string")
Copy
const vrfResource = new netbox.Vrf("vrfResource", {
    description: "string",
    enforceUnique: false,
    name: "string",
    rd: "string",
    tags: ["string"],
    tenantId: 0,
    vrfId: "string",
});
Copy
type: netbox:Vrf
properties:
    description: string
    enforceUnique: false
    name: string
    rd: string
    tags:
        - string
    tenantId: 0
    vrfId: string
Copy

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

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

The Vrf resource accepts the following input properties:

Description string
EnforceUnique bool
Defaults to true.
Name string
Rd string
Tags List<string>
TenantId double
VrfId string
The ID of this resource.
Description string
EnforceUnique bool
Defaults to true.
Name string
Rd string
Tags []string
TenantId float64
VrfId string
The ID of this resource.
description String
enforceUnique Boolean
Defaults to true.
name String
rd String
tags List<String>
tenantId Double
vrfId String
The ID of this resource.
description string
enforceUnique boolean
Defaults to true.
name string
rd string
tags string[]
tenantId number
vrfId string
The ID of this resource.
description str
enforce_unique bool
Defaults to true.
name str
rd str
tags Sequence[str]
tenant_id float
vrf_id str
The ID of this resource.
description String
enforceUnique Boolean
Defaults to true.
name String
rd String
tags List<String>
tenantId Number
vrfId String
The ID of this resource.

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,
        enforce_unique: Optional[bool] = None,
        name: Optional[str] = None,
        rd: Optional[str] = None,
        tags: Optional[Sequence[str]] = None,
        tenant_id: Optional[float] = None,
        vrf_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)
resources:  _:    type: netbox:Vrf    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:
Description string
EnforceUnique bool
Defaults to true.
Name string
Rd string
Tags List<string>
TenantId double
VrfId string
The ID of this resource.
Description string
EnforceUnique bool
Defaults to true.
Name string
Rd string
Tags []string
TenantId float64
VrfId string
The ID of this resource.
description String
enforceUnique Boolean
Defaults to true.
name String
rd String
tags List<String>
tenantId Double
vrfId String
The ID of this resource.
description string
enforceUnique boolean
Defaults to true.
name string
rd string
tags string[]
tenantId number
vrfId string
The ID of this resource.
description str
enforce_unique bool
Defaults to true.
name str
rd str
tags Sequence[str]
tenant_id float
vrf_id str
The ID of this resource.
description String
enforceUnique Boolean
Defaults to true.
name String
rd String
tags List<String>
tenantId Number
vrfId String
The ID of this resource.

Package Details

Repository
netbox e-breuninger/terraform-provider-netbox
License
Notes
This Pulumi package is based on the netbox Terraform Provider.