published on Monday, Nov 16, 2026 by e-breuninger
published on Monday, Nov 16, 2026 by e-breuninger
A NetBox tag (extras.tag). go-netbox has no Writable variant for tags.
From the official documentation:
Tags are user-defined labels which can be applied to a variety of objects within NetBox. They can be used to establish dimensions of organization beyond the relationships built into NetBox. For example, you might create a tag to identify a particular ownership or condition across several types of objects.
Each tag has a label, color, and a URL-friendly slug. For example, the slug for a tag named “Dunder Mifflin, Inc.” would be dunder-mifflin-inc. The slug is generated automatically and makes tags easier to work with as URL parameters. Each tag can also be assigned a description indicating its purpose.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const test = netbox.getTag({
name: "test-tag",
});
import pulumi
import pulumi_netbox as netbox
test = netbox.get_tag(name="test-tag")
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.LookupTag(ctx, &netbox.LookupTagArgs{
Name: pulumi.StringRef("test-tag"),
}, nil)
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 = Netbox.GetTag.Invoke(new()
{
Name = "test-tag",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.NetboxFunctions;
import com.pulumi.netbox.inputs.GetTagArgs;
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) {
final var test = NetboxFunctions.getTag(GetTagArgs.builder()
.name("test-tag")
.build());
}
}
variables:
test:
fn::invoke:
function: netbox:getTag
arguments:
name: test-tag
Example coming soon!
Using getTag
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getTag(args: GetTagArgs, opts?: InvokeOptions): Promise<GetTagResult>
function getTagOutput(args: GetTagOutputArgs, opts?: InvokeOutputOptions): Output<GetTagResult>def get_tag(color: Optional[str] = None,
content_type: Optional[str] = None,
content_type_id: Optional[float] = None,
created: Optional[str] = None,
description: Optional[str] = None,
for_object_type_id: Optional[float] = None,
id: Optional[float] = None,
last_updated: Optional[str] = None,
name: Optional[str] = None,
object_type_name: Optional[float] = None,
owner_group_id: Optional[float] = None,
owner_group_name: Optional[str] = None,
owner_id: Optional[float] = None,
owner_name: Optional[str] = None,
q: Optional[str] = None,
slug: Optional[str] = None,
weight: Optional[float] = None,
opts: Optional[InvokeOptions] = None) -> GetTagResult
def get_tag_output(color: pulumi.Input[Optional[str]] = None,
content_type: pulumi.Input[Optional[str]] = None,
content_type_id: pulumi.Input[Optional[float]] = None,
created: pulumi.Input[Optional[str]] = None,
description: pulumi.Input[Optional[str]] = None,
for_object_type_id: pulumi.Input[Optional[float]] = None,
id: pulumi.Input[Optional[float]] = None,
last_updated: pulumi.Input[Optional[str]] = None,
name: pulumi.Input[Optional[str]] = None,
object_type_name: pulumi.Input[Optional[float]] = None,
owner_group_id: pulumi.Input[Optional[float]] = None,
owner_group_name: pulumi.Input[Optional[str]] = None,
owner_id: pulumi.Input[Optional[float]] = None,
owner_name: pulumi.Input[Optional[str]] = None,
q: pulumi.Input[Optional[str]] = None,
slug: pulumi.Input[Optional[str]] = None,
weight: pulumi.Input[Optional[float]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetTagResult]func LookupTag(ctx *Context, args *LookupTagArgs, opts ...InvokeOption) (*LookupTagResult, error)
func LookupTagOutput(ctx *Context, args *LookupTagOutputArgs, opts ...InvokeOption) LookupTagResultOutput> Note: This function is named LookupTag in the Go SDK.
public static class GetTag
{
public static Task<GetTagResult> InvokeAsync(GetTagArgs args, InvokeOptions? opts = null)
public static Output<GetTagResult> Invoke(GetTagInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetTagResult> Invoke(GetTagInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetTagResult> getTag(GetTagArgs args, InvokeOptions options)
public static Output<GetTagResult> getTag(GetTagArgs args, InvokeOptions options)
public static Output<GetTagResult> getTag(GetTagArgs args, InvokeOutputOptions options)
fn::invoke:
function: netbox:index/getTag:getTag
arguments:
# arguments dictionarydata "netbox_get_tag" "name" {
# arguments
}The following arguments are supported:
- Color string
- Color to match.
- Content
Type string - Content type to match.
- Content
Type doubleId - Id of the content type.
- Created string
- Description string
- For
Object doubleType Id - Id of the for object type.
- Id double
- NetBox id of the tag.
- Last
Updated string - Name string
- Object
Type doubleName - Name of the object types.
- Owner
Group doubleId - Id of the owner group.
- Owner
Group stringName - Name of the owner group.
- Owner
Id double - Id of the owner.
- Owner
Name string - Name of the owner.
- Q string
- Search term, matched against the fields NetBox searches for this object type.
- Slug string
- URL-friendly unique shorthand; derived from name when not set.
- Weight double
- Sort weight; tags with a lower weight are listed first. Must be a whole number.
- Color string
- Color to match.
- Content
Type string - Content type to match.
- Content
Type float64Id - Id of the content type.
- Created string
- Description string
- For
Object float64Type Id - Id of the for object type.
- Id float64
- NetBox id of the tag.
- Last
Updated string - Name string
- Object
Type float64Name - Name of the object types.
- Owner
Group float64Id - Id of the owner group.
- Owner
Group stringName - Name of the owner group.
- Owner
Id float64 - Id of the owner.
- Owner
Name string - Name of the owner.
- Q string
- Search term, matched against the fields NetBox searches for this object type.
- Slug string
- URL-friendly unique shorthand; derived from name when not set.
- Weight float64
- Sort weight; tags with a lower weight are listed first. Must be a whole number.
- color string
- Color to match.
- content_
type string - Content type to match.
- content_
type_ numberid - Id of the content type.
- created string
- description string
- for_
object_ numbertype_ id - Id of the for object type.
- id number
- NetBox id of the tag.
- last_
updated string - name string
- object_
type_ numbername - Name of the object types.
- owner_
group_ numberid - Id of the owner group.
- owner_
group_ stringname - Name of the owner group.
- owner_
id number - Id of the owner.
- owner_
name string - Name of the owner.
- q string
- Search term, matched against the fields NetBox searches for this object type.
- slug string
- URL-friendly unique shorthand; derived from name when not set.
- weight number
- Sort weight; tags with a lower weight are listed first. Must be a whole number.
- color String
- Color to match.
- content
Type String - Content type to match.
- content
Type DoubleId - Id of the content type.
- created String
- description String
- for
Object DoubleType Id - Id of the for object type.
- id Double
- NetBox id of the tag.
- last
Updated String - name String
- object
Type DoubleName - Name of the object types.
- owner
Group DoubleId - Id of the owner group.
- owner
Group StringName - Name of the owner group.
- owner
Id Double - Id of the owner.
- owner
Name String - Name of the owner.
- q String
- Search term, matched against the fields NetBox searches for this object type.
- slug String
- URL-friendly unique shorthand; derived from name when not set.
- weight Double
- Sort weight; tags with a lower weight are listed first. Must be a whole number.
- color string
- Color to match.
- content
Type string - Content type to match.
- content
Type numberId - Id of the content type.
- created string
- description string
- for
Object numberType Id - Id of the for object type.
- id number
- NetBox id of the tag.
- last
Updated string - name string
- object
Type numberName - Name of the object types.
- owner
Group numberId - Id of the owner group.
- owner
Group stringName - Name of the owner group.
- owner
Id number - Id of the owner.
- owner
Name string - Name of the owner.
- q string
- Search term, matched against the fields NetBox searches for this object type.
- slug string
- URL-friendly unique shorthand; derived from name when not set.
- weight number
- Sort weight; tags with a lower weight are listed first. Must be a whole number.
- color str
- Color to match.
- content_
type str - Content type to match.
- content_
type_ floatid - Id of the content type.
- created str
- description str
- for_
object_ floattype_ id - Id of the for object type.
- id float
- NetBox id of the tag.
- last_
updated str - name str
- object_
type_ floatname - Name of the object types.
- owner_
group_ floatid - Id of the owner group.
- owner_
group_ strname - Name of the owner group.
- owner_
id float - Id of the owner.
- owner_
name str - Name of the owner.
- q str
- Search term, matched against the fields NetBox searches for this object type.
- slug str
- URL-friendly unique shorthand; derived from name when not set.
- weight float
- Sort weight; tags with a lower weight are listed first. Must be a whole number.
- color String
- Color to match.
- content
Type String - Content type to match.
- content
Type NumberId - Id of the content type.
- created String
- description String
- for
Object NumberType Id - Id of the for object type.
- id Number
- NetBox id of the tag.
- last
Updated String - name String
- object
Type NumberName - Name of the object types.
- owner
Group NumberId - Id of the owner group.
- owner
Group StringName - Name of the owner group.
- owner
Id Number - Id of the owner.
- owner
Name String - Name of the owner.
- q String
- Search term, matched against the fields NetBox searches for this object type.
- slug String
- URL-friendly unique shorthand; derived from name when not set.
- weight Number
- Sort weight; tags with a lower weight are listed first. Must be a whole number.
getTag Result
The following output properties are available:
- Color
Hex string - Hex color without the leading #. Defaults to 9e9e9e.
- Created string
- Description string
- Id double
- NetBox id of the tag.
- Last
Updated string - Name string
- Object
Types List<string> - Object types the tag can be assigned to, e.g. dcim.site.
- Slug string
- URL-friendly unique shorthand; derived from name when not set.
- Url string
- Weight double
- Sort weight; tags with a lower weight are listed first. Must be a whole number.
- Color string
- Color to match.
- Content
Type string - Content type to match.
- Content
Type doubleId - Id of the content type.
- For
Object doubleType Id - Id of the for object type.
- Object
Type doubleName - Name of the object types.
- Owner
Group doubleId - Id of the owner group.
- Owner
Group stringName - Name of the owner group.
- Owner
Id double - Id of the owner.
- Owner
Name string - Name of the owner.
- Q string
- Search term, matched against the fields NetBox searches for this object type.
- Color
Hex string - Hex color without the leading #. Defaults to 9e9e9e.
- Created string
- Description string
- Id float64
- NetBox id of the tag.
- Last
Updated string - Name string
- Object
Types []string - Object types the tag can be assigned to, e.g. dcim.site.
- Slug string
- URL-friendly unique shorthand; derived from name when not set.
- Url string
- Weight float64
- Sort weight; tags with a lower weight are listed first. Must be a whole number.
- Color string
- Color to match.
- Content
Type string - Content type to match.
- Content
Type float64Id - Id of the content type.
- For
Object float64Type Id - Id of the for object type.
- Object
Type float64Name - Name of the object types.
- Owner
Group float64Id - Id of the owner group.
- Owner
Group stringName - Name of the owner group.
- Owner
Id float64 - Id of the owner.
- Owner
Name string - Name of the owner.
- Q string
- Search term, matched against the fields NetBox searches for this object type.
- color_
hex string - Hex color without the leading #. Defaults to 9e9e9e.
- created string
- description string
- id number
- NetBox id of the tag.
- last_
updated string - name string
- object_
types list(string) - Object types the tag can be assigned to, e.g. dcim.site.
- slug string
- URL-friendly unique shorthand; derived from name when not set.
- url string
- weight number
- Sort weight; tags with a lower weight are listed first. Must be a whole number.
- color string
- Color to match.
- content_
type string - Content type to match.
- content_
type_ numberid - Id of the content type.
- for_
object_ numbertype_ id - Id of the for object type.
- object_
type_ numbername - Name of the object types.
- owner_
group_ numberid - Id of the owner group.
- owner_
group_ stringname - Name of the owner group.
- owner_
id number - Id of the owner.
- owner_
name string - Name of the owner.
- q string
- Search term, matched against the fields NetBox searches for this object type.
- color
Hex String - Hex color without the leading #. Defaults to 9e9e9e.
- created String
- description String
- id Double
- NetBox id of the tag.
- last
Updated String - name String
- object
Types List<String> - Object types the tag can be assigned to, e.g. dcim.site.
- slug String
- URL-friendly unique shorthand; derived from name when not set.
- url String
- weight Double
- Sort weight; tags with a lower weight are listed first. Must be a whole number.
- color String
- Color to match.
- content
Type String - Content type to match.
- content
Type DoubleId - Id of the content type.
- for
Object DoubleType Id - Id of the for object type.
- object
Type DoubleName - Name of the object types.
- owner
Group DoubleId - Id of the owner group.
- owner
Group StringName - Name of the owner group.
- owner
Id Double - Id of the owner.
- owner
Name String - Name of the owner.
- q String
- Search term, matched against the fields NetBox searches for this object type.
- color
Hex string - Hex color without the leading #. Defaults to 9e9e9e.
- created string
- description string
- id number
- NetBox id of the tag.
- last
Updated string - name string
- object
Types string[] - Object types the tag can be assigned to, e.g. dcim.site.
- slug string
- URL-friendly unique shorthand; derived from name when not set.
- url string
- weight number
- Sort weight; tags with a lower weight are listed first. Must be a whole number.
- color string
- Color to match.
- content
Type string - Content type to match.
- content
Type numberId - Id of the content type.
- for
Object numberType Id - Id of the for object type.
- object
Type numberName - Name of the object types.
- owner
Group numberId - Id of the owner group.
- owner
Group stringName - Name of the owner group.
- owner
Id number - Id of the owner.
- owner
Name string - Name of the owner.
- q string
- Search term, matched against the fields NetBox searches for this object type.
- color_
hex str - Hex color without the leading #. Defaults to 9e9e9e.
- created str
- description str
- id float
- NetBox id of the tag.
- last_
updated str - name str
- object_
types Sequence[str] - Object types the tag can be assigned to, e.g. dcim.site.
- slug str
- URL-friendly unique shorthand; derived from name when not set.
- url str
- weight float
- Sort weight; tags with a lower weight are listed first. Must be a whole number.
- color str
- Color to match.
- content_
type str - Content type to match.
- content_
type_ floatid - Id of the content type.
- for_
object_ floattype_ id - Id of the for object type.
- object_
type_ floatname - Name of the object types.
- owner_
group_ floatid - Id of the owner group.
- owner_
group_ strname - Name of the owner group.
- owner_
id float - Id of the owner.
- owner_
name str - Name of the owner.
- q str
- Search term, matched against the fields NetBox searches for this object type.
- color
Hex String - Hex color without the leading #. Defaults to 9e9e9e.
- created String
- description String
- id Number
- NetBox id of the tag.
- last
Updated String - name String
- object
Types List<String> - Object types the tag can be assigned to, e.g. dcim.site.
- slug String
- URL-friendly unique shorthand; derived from name when not set.
- url String
- weight Number
- Sort weight; tags with a lower weight are listed first. Must be a whole number.
- color String
- Color to match.
- content
Type String - Content type to match.
- content
Type NumberId - Id of the content type.
- for
Object NumberType Id - Id of the for object type.
- object
Type NumberName - Name of the object types.
- owner
Group NumberId - Id of the owner group.
- owner
Group StringName - Name of the owner group.
- owner
Id Number - Id of the owner.
- owner
Name String - Name of the owner.
- q String
- Search term, matched against the fields NetBox searches for this object type.
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