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",
]});
import pulumi
import pulumi_netbox as netbox
cust_a_prod = netbox.Vrf("custAProd", tags=[
"customer-a",
"prod",
])
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
})
}
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",
},
});
});
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());
}
}
resources:
custAProd:
type: netbox:Vrf
properties:
tags:
- customer-a
- prod
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)
type: netbox: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 Netbox.Vrf("vrfResource", new()
{
Description = "string",
EnforceUnique = false,
Name = "string",
Rd = "string",
Tags = new[]
{
"string",
},
TenantId = 0,
VrfId = "string",
});
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"),
})
var vrfResource = new Vrf("vrfResource", VrfArgs.builder()
.description("string")
.enforceUnique(false)
.name("string")
.rd("string")
.tags("string")
.tenantId(0)
.vrfId("string")
.build());
vrf_resource = netbox.Vrf("vrfResource",
description="string",
enforce_unique=False,
name="string",
rd="string",
tags=["string"],
tenant_id=0,
vrf_id="string")
const vrfResource = new netbox.Vrf("vrfResource", {
description: "string",
enforceUnique: false,
name: "string",
rd: "string",
tags: ["string"],
tenantId: 0,
vrfId: "string",
});
type: netbox:Vrf
properties:
description: string
enforceUnique: false
name: string
rd: string
tags:
- string
tenantId: 0
vrfId: 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
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
- Enforce
Unique bool - Defaults to
true
. - Name string
- Rd string
- List<string>
- Tenant
Id double - Vrf
Id string - The ID of this resource.
- Description string
- Enforce
Unique bool - Defaults to
true
. - Name string
- Rd string
- []string
- Tenant
Id float64 - Vrf
Id string - The ID of this resource.
- description String
- enforce
Unique Boolean - Defaults to
true
. - name String
- rd String
- List<String>
- tenant
Id Double - vrf
Id String - The ID of this resource.
- description string
- enforce
Unique boolean - Defaults to
true
. - name string
- rd string
- string[]
- tenant
Id number - vrf
Id string - The ID of this resource.
- description str
- enforce_
unique bool - Defaults to
true
. - name str
- rd str
- Sequence[str]
- tenant_
id float - vrf_
id str - The ID of this resource.
- description String
- enforce
Unique Boolean - Defaults to
true
. - name String
- rd String
- List<String>
- tenant
Id Number - vrf
Id 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
- 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.
- Description string
- Enforce
Unique bool - Defaults to
true
. - Name string
- Rd string
- List<string>
- Tenant
Id double - Vrf
Id string - The ID of this resource.
- Description string
- Enforce
Unique bool - Defaults to
true
. - Name string
- Rd string
- []string
- Tenant
Id float64 - Vrf
Id string - The ID of this resource.
- description String
- enforce
Unique Boolean - Defaults to
true
. - name String
- rd String
- List<String>
- tenant
Id Double - vrf
Id String - The ID of this resource.
- description string
- enforce
Unique boolean - Defaults to
true
. - name string
- rd string
- string[]
- tenant
Id number - vrf
Id string - The ID of this resource.
- description str
- enforce_
unique bool - Defaults to
true
. - name str
- rd str
- Sequence[str]
- tenant_
id float - vrf_
id str - The ID of this resource.
- description String
- enforce
Unique Boolean - Defaults to
true
. - name String
- rd String
- List<String>
- tenant
Id Number - vrf
Id 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.