published on Monday, Nov 16, 2026 by e-breuninger
published on Monday, Nov 16, 2026 by e-breuninger
A NetBox custom field choice set (extras.customfieldchoiceset).
From the official documentation:
Single- and multi-selection custom fields must define a set of valid choices from which the user may choose when defining the field value. These choices are defined as sets that may be reused among multiple custom fields.
A choice set must define a base choice set and/or a set of arbitrary extra choices.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const test = netbox.getCustomFieldChoiceSet({
id: 123,
});
import pulumi
import pulumi_netbox as netbox
test = netbox.get_custom_field_choice_set(id=123)
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.LookupCustomFieldChoiceSet(ctx, &netbox.LookupCustomFieldChoiceSetArgs{
Id: pulumi.Float64Ref(123),
}, 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.GetCustomFieldChoiceSet.Invoke(new()
{
Id = 123,
});
});
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.GetCustomFieldChoiceSetArgs;
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.getCustomFieldChoiceSet(GetCustomFieldChoiceSetArgs.builder()
.id(123)
.build());
}
}
variables:
test:
fn::invoke:
function: netbox:getCustomFieldChoiceSet
arguments:
id: 123
Example coming soon!
Using getCustomFieldChoiceSet
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 getCustomFieldChoiceSet(args: GetCustomFieldChoiceSetArgs, opts?: InvokeOptions): Promise<GetCustomFieldChoiceSetResult>
function getCustomFieldChoiceSetOutput(args: GetCustomFieldChoiceSetOutputArgs, opts?: InvokeOutputOptions): Output<GetCustomFieldChoiceSetResult>def get_custom_field_choice_set(base_choices: Optional[str] = None,
choice: Optional[str] = None,
choice_color: Optional[str] = None,
created: Optional[str] = None,
description: Optional[str] = None,
id: Optional[float] = None,
last_updated: Optional[str] = None,
name: Optional[str] = None,
order_alphabetically: Optional[bool] = 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,
opts: Optional[InvokeOptions] = None) -> GetCustomFieldChoiceSetResult
def get_custom_field_choice_set_output(base_choices: pulumi.Input[Optional[str]] = None,
choice: pulumi.Input[Optional[str]] = None,
choice_color: pulumi.Input[Optional[str]] = None,
created: pulumi.Input[Optional[str]] = None,
description: pulumi.Input[Optional[str]] = None,
id: pulumi.Input[Optional[float]] = None,
last_updated: pulumi.Input[Optional[str]] = None,
name: pulumi.Input[Optional[str]] = None,
order_alphabetically: pulumi.Input[Optional[bool]] = 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,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetCustomFieldChoiceSetResult]func LookupCustomFieldChoiceSet(ctx *Context, args *LookupCustomFieldChoiceSetArgs, opts ...InvokeOption) (*LookupCustomFieldChoiceSetResult, error)
func LookupCustomFieldChoiceSetOutput(ctx *Context, args *LookupCustomFieldChoiceSetOutputArgs, opts ...InvokeOption) LookupCustomFieldChoiceSetResultOutput> Note: This function is named LookupCustomFieldChoiceSet in the Go SDK.
public static class GetCustomFieldChoiceSet
{
public static Task<GetCustomFieldChoiceSetResult> InvokeAsync(GetCustomFieldChoiceSetArgs args, InvokeOptions? opts = null)
public static Output<GetCustomFieldChoiceSetResult> Invoke(GetCustomFieldChoiceSetInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetCustomFieldChoiceSetResult> Invoke(GetCustomFieldChoiceSetInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetCustomFieldChoiceSetResult> getCustomFieldChoiceSet(GetCustomFieldChoiceSetArgs args, InvokeOptions options)
public static Output<GetCustomFieldChoiceSetResult> getCustomFieldChoiceSet(GetCustomFieldChoiceSetArgs args, InvokeOptions options)
public static Output<GetCustomFieldChoiceSetResult> getCustomFieldChoiceSet(GetCustomFieldChoiceSetArgs args, InvokeOutputOptions options)
fn::invoke:
function: netbox:index/getCustomFieldChoiceSet:getCustomFieldChoiceSet
arguments:
# arguments dictionarydata "netbox_get_custom_field_choice_set" "name" {
# arguments
}The following arguments are supported:
- Base
Choices string - Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
- Choice string
- Choice to match.
- Choice
Color string - Choice colors.
- Created string
- Description string
- Id double
- NetBox id of the choice set.
- Last
Updated string - Name string
- Order
Alphabetically bool - Sort choices alphabetically instead of by definition order.
- Owner
Group doubleId - Id of the owner group.
- Owner
Group stringName - Name of the owner group.
- Owner
Id double - Id of the owner the object is assigned to.
- Owner
Name string - Name of the owner.
- Q string
- Search term, matched against the fields NetBox searches for this object type.
- Base
Choices string - Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
- Choice string
- Choice to match.
- Choice
Color string - Choice colors.
- Created string
- Description string
- Id float64
- NetBox id of the choice set.
- Last
Updated string - Name string
- Order
Alphabetically bool - Sort choices alphabetically instead of by definition order.
- Owner
Group float64Id - Id of the owner group.
- Owner
Group stringName - Name of the owner group.
- Owner
Id float64 - Id of the owner the object is assigned to.
- Owner
Name string - Name of the owner.
- Q string
- Search term, matched against the fields NetBox searches for this object type.
- base_
choices string - Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
- choice string
- Choice to match.
- choice_
color string - Choice colors.
- created string
- description string
- id number
- NetBox id of the choice set.
- last_
updated string - name string
- order_
alphabetically bool - Sort choices alphabetically instead of by definition order.
- owner_
group_ numberid - Id of the owner group.
- owner_
group_ stringname - Name of the owner group.
- owner_
id number - Id of the owner the object is assigned to.
- owner_
name string - Name of the owner.
- q string
- Search term, matched against the fields NetBox searches for this object type.
- base
Choices String - Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
- choice String
- Choice to match.
- choice
Color String - Choice colors.
- created String
- description String
- id Double
- NetBox id of the choice set.
- last
Updated String - name String
- order
Alphabetically Boolean - Sort choices alphabetically instead of by definition order.
- owner
Group DoubleId - Id of the owner group.
- owner
Group StringName - Name of the owner group.
- owner
Id Double - Id of the owner the object is assigned to.
- owner
Name String - Name of the owner.
- q String
- Search term, matched against the fields NetBox searches for this object type.
- base
Choices string - Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
- choice string
- Choice to match.
- choice
Color string - Choice colors.
- created string
- description string
- id number
- NetBox id of the choice set.
- last
Updated string - name string
- order
Alphabetically boolean - Sort choices alphabetically instead of by definition order.
- owner
Group numberId - Id of the owner group.
- owner
Group stringName - Name of the owner group.
- owner
Id number - Id of the owner the object is assigned to.
- owner
Name string - Name of the owner.
- q string
- Search term, matched against the fields NetBox searches for this object type.
- base_
choices str - Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
- choice str
- Choice to match.
- choice_
color str - Choice colors.
- created str
- description str
- id float
- NetBox id of the choice set.
- last_
updated str - name str
- order_
alphabetically bool - Sort choices alphabetically instead of by definition order.
- owner_
group_ floatid - Id of the owner group.
- owner_
group_ strname - Name of the owner group.
- owner_
id float - Id of the owner the object is assigned to.
- owner_
name str - Name of the owner.
- q str
- Search term, matched against the fields NetBox searches for this object type.
- base
Choices String - Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
- choice String
- Choice to match.
- choice
Color String - Choice colors.
- created String
- description String
- id Number
- NetBox id of the choice set.
- last
Updated String - name String
- order
Alphabetically Boolean - Sort choices alphabetically instead of by definition order.
- owner
Group NumberId - Id of the owner group.
- owner
Group StringName - Name of the owner group.
- owner
Id Number - Id of the owner the object is assigned to.
- owner
Name String - Name of the owner.
- q String
- Search term, matched against the fields NetBox searches for this object type.
getCustomFieldChoiceSet Result
The following output properties are available:
- Base
Choices string - Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
- Choice
Colors Dictionary<string, string> - Colors of choices, by choice value. One of blue, indigo, purple, pink, red, orange, yellow, green, teal, cyan, gray, black or white each.
- Choices
Count double - Created string
- Description string
- Extra
Choices List<GetCustom Field Choice Set Extra Choice> - Additional choices as value/label pairs.
- Id double
- NetBox id of the choice set.
- Last
Updated string - Name string
- Order
Alphabetically bool - Sort choices alphabetically instead of by definition order.
- Owner
Id double - Id of the owner the object is assigned to.
- Url string
- Choice string
- Choice to match.
- Choice
Color string - Choice colors.
- Owner
Group doubleId - Id of the owner group.
- Owner
Group stringName - Name of the owner group.
- Owner
Name string - Name of the owner.
- Q string
- Search term, matched against the fields NetBox searches for this object type.
- Base
Choices string - Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
- Choice
Colors map[string]string - Colors of choices, by choice value. One of blue, indigo, purple, pink, red, orange, yellow, green, teal, cyan, gray, black or white each.
- Choices
Count float64 - Created string
- Description string
- Extra
Choices []GetCustom Field Choice Set Extra Choice - Additional choices as value/label pairs.
- Id float64
- NetBox id of the choice set.
- Last
Updated string - Name string
- Order
Alphabetically bool - Sort choices alphabetically instead of by definition order.
- Owner
Id float64 - Id of the owner the object is assigned to.
- Url string
- Choice string
- Choice to match.
- Choice
Color string - Choice colors.
- Owner
Group float64Id - Id of the owner group.
- Owner
Group stringName - Name of the owner group.
- Owner
Name string - Name of the owner.
- Q string
- Search term, matched against the fields NetBox searches for this object type.
- base_
choices string - Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
- choice_
colors map(string) - Colors of choices, by choice value. One of blue, indigo, purple, pink, red, orange, yellow, green, teal, cyan, gray, black or white each.
- choices_
count number - created string
- description string
- extra_
choices list(object) - Additional choices as value/label pairs.
- id number
- NetBox id of the choice set.
- last_
updated string - name string
- order_
alphabetically bool - Sort choices alphabetically instead of by definition order.
- owner_
id number - Id of the owner the object is assigned to.
- url string
- choice string
- Choice to match.
- choice_
color string - Choice colors.
- owner_
group_ numberid - Id of the owner group.
- owner_
group_ stringname - Name of the owner group.
- owner_
name string - Name of the owner.
- q string
- Search term, matched against the fields NetBox searches for this object type.
- base
Choices String - Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
- choice
Colors Map<String,String> - Colors of choices, by choice value. One of blue, indigo, purple, pink, red, orange, yellow, green, teal, cyan, gray, black or white each.
- choices
Count Double - created String
- description String
- extra
Choices List<GetCustom Field Choice Set Extra Choice> - Additional choices as value/label pairs.
- id Double
- NetBox id of the choice set.
- last
Updated String - name String
- order
Alphabetically Boolean - Sort choices alphabetically instead of by definition order.
- owner
Id Double - Id of the owner the object is assigned to.
- url String
- choice String
- Choice to match.
- choice
Color String - Choice colors.
- owner
Group DoubleId - Id of the owner group.
- owner
Group StringName - Name of the owner group.
- owner
Name String - Name of the owner.
- q String
- Search term, matched against the fields NetBox searches for this object type.
- base
Choices string - Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
- choice
Colors {[key: string]: string} - Colors of choices, by choice value. One of blue, indigo, purple, pink, red, orange, yellow, green, teal, cyan, gray, black or white each.
- choices
Count number - created string
- description string
- extra
Choices GetCustom Field Choice Set Extra Choice[] - Additional choices as value/label pairs.
- id number
- NetBox id of the choice set.
- last
Updated string - name string
- order
Alphabetically boolean - Sort choices alphabetically instead of by definition order.
- owner
Id number - Id of the owner the object is assigned to.
- url string
- choice string
- Choice to match.
- choice
Color string - Choice colors.
- owner
Group numberId - Id of the owner group.
- owner
Group stringName - Name of the owner group.
- owner
Name string - Name of the owner.
- q string
- Search term, matched against the fields NetBox searches for this object type.
- base_
choices str - Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
- choice_
colors Mapping[str, str] - Colors of choices, by choice value. One of blue, indigo, purple, pink, red, orange, yellow, green, teal, cyan, gray, black or white each.
- choices_
count float - created str
- description str
- extra_
choices Sequence[GetCustom Field Choice Set Extra Choice] - Additional choices as value/label pairs.
- id float
- NetBox id of the choice set.
- last_
updated str - name str
- order_
alphabetically bool - Sort choices alphabetically instead of by definition order.
- owner_
id float - Id of the owner the object is assigned to.
- url str
- choice str
- Choice to match.
- choice_
color str - Choice colors.
- owner_
group_ floatid - Id of the owner group.
- owner_
group_ strname - Name of the owner group.
- owner_
name str - Name of the owner.
- q str
- Search term, matched against the fields NetBox searches for this object type.
- base
Choices String - Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
- choice
Colors Map<String> - Colors of choices, by choice value. One of blue, indigo, purple, pink, red, orange, yellow, green, teal, cyan, gray, black or white each.
- choices
Count Number - created String
- description String
- extra
Choices List<Property Map> - Additional choices as value/label pairs.
- id Number
- NetBox id of the choice set.
- last
Updated String - name String
- order
Alphabetically Boolean - Sort choices alphabetically instead of by definition order.
- owner
Id Number - Id of the owner the object is assigned to.
- url String
- choice String
- Choice to match.
- choice
Color String - Choice colors.
- owner
Group NumberId - Id of the owner group.
- owner
Group StringName - Name of the owner group.
- owner
Name String - Name of the owner.
- q String
- Search term, matched against the fields NetBox searches for this object type.
Supporting Types
GetCustomFieldChoiceSetExtraChoice
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