published on Monday, Nov 16, 2026 by e-breuninger
published on Monday, Nov 16, 2026 by e-breuninger
A NetBox VLAN translation policy (ipam.vlantranslationpolicy): a named set of VLAN translation rules.
From the official documentation:
VLAN translation is a feature that consists of VLAN translation policies and VLAN translation rules. Many rules can belong to a policy, and each rule defines a mapping of a local to remote VLAN ID (VID). A policy can then be assigned to an Interface or VMInterface, and all VLAN translation rules associated with that policy will be visible in the interface details.
There are uniqueness constraints on
(policy, local_vid)and on(policy, remote_vid)in theVLANTranslationRulemodel. Thus, you cannot have multiple rules linked to the same policy that have the same local VID or the same remote VID. A set of policies and rules might look like this:Policy 1:
- Rule: 100 > 200
- Rule: 101 > 201
Policy 2:
- Rule: 100 > 300
- Rule: 101 > 301
However this is not allowed:
Policy 3:
- Rule: 100 > 200
- Rule: 100 > 300
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const test = new netbox.VlanTranslationPolicy("test", {
name: "test-vlan-translation-policy",
description: "test-description",
});
import pulumi
import pulumi_netbox as netbox
test = netbox.VlanTranslationPolicy("test",
name="test-vlan-translation-policy",
description="test-description")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v6/netbox"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := netbox.NewVlanTranslationPolicy(ctx, "test", &netbox.VlanTranslationPolicyArgs{
Name: pulumi.String("test-vlan-translation-policy"),
Description: pulumi.String("test-description"),
})
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 test = new Netbox.VlanTranslationPolicy("test", new()
{
Name = "test-vlan-translation-policy",
Description = "test-description",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.VlanTranslationPolicy;
import com.pulumi.netbox.VlanTranslationPolicyArgs;
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 test = new VlanTranslationPolicy("test", VlanTranslationPolicyArgs.builder()
.name("test-vlan-translation-policy")
.description("test-description")
.build());
}
}
resources:
test:
type: netbox:VlanTranslationPolicy
properties:
name: test-vlan-translation-policy
description: test-description
Example coming soon!
Create VlanTranslationPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VlanTranslationPolicy(name: string, args?: VlanTranslationPolicyArgs, opts?: CustomResourceOptions);@overload
def VlanTranslationPolicy(resource_name: str,
args: Optional[VlanTranslationPolicyArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def VlanTranslationPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
comments: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
owner_id: Optional[float] = None)func NewVlanTranslationPolicy(ctx *Context, name string, args *VlanTranslationPolicyArgs, opts ...ResourceOption) (*VlanTranslationPolicy, error)public VlanTranslationPolicy(string name, VlanTranslationPolicyArgs? args = null, CustomResourceOptions? opts = null)
public VlanTranslationPolicy(String name, VlanTranslationPolicyArgs args)
public VlanTranslationPolicy(String name, VlanTranslationPolicyArgs args, CustomResourceOptions options)
type: netbox:VlanTranslationPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "netbox_vlan_translation_policy" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args VlanTranslationPolicyArgs
- 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 VlanTranslationPolicyArgs
- 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 VlanTranslationPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VlanTranslationPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VlanTranslationPolicyArgs
- 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 vlanTranslationPolicyResource = new Netbox.VlanTranslationPolicy("vlanTranslationPolicyResource", new()
{
Comments = "string",
Description = "string",
Name = "string",
OwnerId = 0.0,
});
example, err := netbox.NewVlanTranslationPolicy(ctx, "vlanTranslationPolicyResource", &netbox.VlanTranslationPolicyArgs{
Comments: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
OwnerId: pulumi.Float64(0),
})
resource "netbox_vlan_translation_policy" "vlanTranslationPolicyResource" {
lifecycle {
create_before_destroy = true
}
comments = "string"
description = "string"
name = "string"
owner_id = 0
}
var vlanTranslationPolicyResource = new VlanTranslationPolicy("vlanTranslationPolicyResource", VlanTranslationPolicyArgs.builder()
.comments("string")
.description("string")
.name("string")
.ownerId(0.0)
.build());
vlan_translation_policy_resource = netbox.VlanTranslationPolicy("vlanTranslationPolicyResource",
comments="string",
description="string",
name="string",
owner_id=float(0))
const vlanTranslationPolicyResource = new netbox.VlanTranslationPolicy("vlanTranslationPolicyResource", {
comments: "string",
description: "string",
name: "string",
ownerId: 0,
});
type: netbox:VlanTranslationPolicy
properties:
comments: string
description: string
name: string
ownerId: 0
VlanTranslationPolicy 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 VlanTranslationPolicy resource accepts the following input properties:
- Comments string
- Description string
- Name string
- Owner
Id double - Id of the owner the object is assigned to.
- Comments string
- Description string
- Name string
- Owner
Id float64 - Id of the owner the object is assigned to.
- comments string
- description string
- name string
- owner_
id number - Id of the owner the object is assigned to.
- comments String
- description String
- name String
- owner
Id Double - Id of the owner the object is assigned to.
- comments string
- description string
- name string
- owner
Id number - Id of the owner the object is assigned to.
- comments str
- description str
- name str
- owner_
id float - Id of the owner the object is assigned to.
- comments String
- description String
- name String
- owner
Id Number - Id of the owner the object is assigned to.
Outputs
All input properties are implicitly available as output properties. Additionally, the VlanTranslationPolicy resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Url string
- Vlan
Translation doublePolicy Id - NetBox id.
- Id string
- The provider-assigned unique ID for this managed resource.
- Url string
- Vlan
Translation float64Policy Id - NetBox id.
- id string
- The provider-assigned unique ID for this managed resource.
- url string
- vlan_
translation_ numberpolicy_ id - NetBox id.
- id String
- The provider-assigned unique ID for this managed resource.
- url String
- vlan
Translation DoublePolicy Id - NetBox id.
- id string
- The provider-assigned unique ID for this managed resource.
- url string
- vlan
Translation numberPolicy Id - NetBox id.
- id str
- The provider-assigned unique ID for this managed resource.
- url str
- vlan_
translation_ floatpolicy_ id - NetBox id.
- id String
- The provider-assigned unique ID for this managed resource.
- url String
- vlan
Translation NumberPolicy Id - NetBox id.
Look up Existing VlanTranslationPolicy Resource
Get an existing VlanTranslationPolicy 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?: VlanTranslationPolicyState, opts?: CustomResourceOptions): VlanTranslationPolicy@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
comments: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
owner_id: Optional[float] = None,
url: Optional[str] = None,
vlan_translation_policy_id: Optional[float] = None) -> VlanTranslationPolicyfunc GetVlanTranslationPolicy(ctx *Context, name string, id IDInput, state *VlanTranslationPolicyState, opts ...ResourceOption) (*VlanTranslationPolicy, error)public static VlanTranslationPolicy Get(string name, Input<string> id, VlanTranslationPolicyState? state, CustomResourceOptions? opts = null)public static VlanTranslationPolicy get(String name, Output<String> id, VlanTranslationPolicyState state, CustomResourceOptions options)resources: existingVlanTranslationPolicy: type: netbox:VlanTranslationPolicy get: id: ${id}import {
to = netbox_vlan_translation_policy.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- state VlanTranslationPolicyState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- 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 resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state VlanTranslationPolicyState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- state VlanTranslationPolicyState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- state VlanTranslationPolicyState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
- Comments string
- Description string
- Name string
- Owner
Id double - Id of the owner the object is assigned to.
- Url string
- Vlan
Translation doublePolicy Id - NetBox id.
- Comments string
- Description string
- Name string
- Owner
Id float64 - Id of the owner the object is assigned to.
- Url string
- Vlan
Translation float64Policy Id - NetBox id.
- comments string
- description string
- name string
- owner_
id number - Id of the owner the object is assigned to.
- url string
- vlan_
translation_ numberpolicy_ id - NetBox id.
- comments String
- description String
- name String
- owner
Id Double - Id of the owner the object is assigned to.
- url String
- vlan
Translation DoublePolicy Id - NetBox id.
- comments string
- description string
- name string
- owner
Id number - Id of the owner the object is assigned to.
- url string
- vlan
Translation numberPolicy Id - NetBox id.
- comments str
- description str
- name str
- owner_
id float - Id of the owner the object is assigned to.
- url str
- vlan_
translation_ floatpolicy_ id - NetBox id.
- comments String
- description String
- name String
- owner
Id Number - Id of the owner the object is assigned to.
- url String
- vlan
Translation NumberPolicy Id - NetBox id.
Import
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
terraform
import {
to = netbox_vlan_translation_policy.test
id = “123”
}
The pulumi import command can be used, for example:
$ pulumi import netbox:index/vlanTranslationPolicy:VlanTranslationPolicy test 123
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- netbox e-breuninger/terraform-provider-netbox
- License
- Notes
- This Pulumi package is based on the
netboxTerraform Provider.
published on Monday, Nov 16, 2026 by e-breuninger