1. Registry
  2. Packages
  3. Netbox Provider
  4. API Docs
  5. getCustomFieldChoiceSet
Viewing docs for netbox 6.0.1
published on Monday, Nov 16, 2026 by e-breuninger
netbox
Viewing docs for netbox 6.0.1
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 dictionary
    data "netbox_get_custom_field_choice_set" "name" {
        # arguments
    }

    The following arguments are supported:

    BaseChoices string
    Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
    Choice string
    Choice to match.
    ChoiceColor string
    Choice colors.
    Created string
    Description string
    Id double
    NetBox id of the choice set.
    LastUpdated string
    Name string
    OrderAlphabetically bool
    Sort choices alphabetically instead of by definition order.
    OwnerGroupId double
    Id of the owner group.
    OwnerGroupName string
    Name of the owner group.
    OwnerId double
    Id of the owner the object is assigned to.
    OwnerName string
    Name of the owner.
    Q string
    Search term, matched against the fields NetBox searches for this object type.
    BaseChoices string
    Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
    Choice string
    Choice to match.
    ChoiceColor string
    Choice colors.
    Created string
    Description string
    Id float64
    NetBox id of the choice set.
    LastUpdated string
    Name string
    OrderAlphabetically bool
    Sort choices alphabetically instead of by definition order.
    OwnerGroupId float64
    Id of the owner group.
    OwnerGroupName string
    Name of the owner group.
    OwnerId float64
    Id of the owner the object is assigned to.
    OwnerName 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_id number
    Id of the owner group.
    owner_group_name string
    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.
    baseChoices String
    Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
    choice String
    Choice to match.
    choiceColor String
    Choice colors.
    created String
    description String
    id Double
    NetBox id of the choice set.
    lastUpdated String
    name String
    orderAlphabetically Boolean
    Sort choices alphabetically instead of by definition order.
    ownerGroupId Double
    Id of the owner group.
    ownerGroupName String
    Name of the owner group.
    ownerId Double
    Id of the owner the object is assigned to.
    ownerName String
    Name of the owner.
    q String
    Search term, matched against the fields NetBox searches for this object type.
    baseChoices string
    Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
    choice string
    Choice to match.
    choiceColor string
    Choice colors.
    created string
    description string
    id number
    NetBox id of the choice set.
    lastUpdated string
    name string
    orderAlphabetically boolean
    Sort choices alphabetically instead of by definition order.
    ownerGroupId number
    Id of the owner group.
    ownerGroupName string
    Name of the owner group.
    ownerId number
    Id of the owner the object is assigned to.
    ownerName 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_id float
    Id of the owner group.
    owner_group_name str
    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.
    baseChoices String
    Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
    choice String
    Choice to match.
    choiceColor String
    Choice colors.
    created String
    description String
    id Number
    NetBox id of the choice set.
    lastUpdated String
    name String
    orderAlphabetically Boolean
    Sort choices alphabetically instead of by definition order.
    ownerGroupId Number
    Id of the owner group.
    ownerGroupName String
    Name of the owner group.
    ownerId Number
    Id of the owner the object is assigned to.
    ownerName 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:

    BaseChoices string
    Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
    ChoiceColors 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.
    ChoicesCount double
    Created string
    Description string
    ExtraChoices List<GetCustomFieldChoiceSetExtraChoice>
    Additional choices as value/label pairs.
    Id double
    NetBox id of the choice set.
    LastUpdated string
    Name string
    OrderAlphabetically bool
    Sort choices alphabetically instead of by definition order.
    OwnerId double
    Id of the owner the object is assigned to.
    Url string
    Choice string
    Choice to match.
    ChoiceColor string
    Choice colors.
    OwnerGroupId double
    Id of the owner group.
    OwnerGroupName string
    Name of the owner group.
    OwnerName string
    Name of the owner.
    Q string
    Search term, matched against the fields NetBox searches for this object type.
    BaseChoices string
    Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
    ChoiceColors 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.
    ChoicesCount float64
    Created string
    Description string
    ExtraChoices []GetCustomFieldChoiceSetExtraChoice
    Additional choices as value/label pairs.
    Id float64
    NetBox id of the choice set.
    LastUpdated string
    Name string
    OrderAlphabetically bool
    Sort choices alphabetically instead of by definition order.
    OwnerId float64
    Id of the owner the object is assigned to.
    Url string
    Choice string
    Choice to match.
    ChoiceColor string
    Choice colors.
    OwnerGroupId float64
    Id of the owner group.
    OwnerGroupName string
    Name of the owner group.
    OwnerName 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_id number
    Id of the owner group.
    owner_group_name string
    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.
    baseChoices String
    Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
    choiceColors 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.
    choicesCount Double
    created String
    description String
    extraChoices List<GetCustomFieldChoiceSetExtraChoice>
    Additional choices as value/label pairs.
    id Double
    NetBox id of the choice set.
    lastUpdated String
    name String
    orderAlphabetically Boolean
    Sort choices alphabetically instead of by definition order.
    ownerId Double
    Id of the owner the object is assigned to.
    url String
    choice String
    Choice to match.
    choiceColor String
    Choice colors.
    ownerGroupId Double
    Id of the owner group.
    ownerGroupName String
    Name of the owner group.
    ownerName String
    Name of the owner.
    q String
    Search term, matched against the fields NetBox searches for this object type.
    baseChoices string
    Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
    choiceColors {[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.
    choicesCount number
    created string
    description string
    extraChoices GetCustomFieldChoiceSetExtraChoice[]
    Additional choices as value/label pairs.
    id number
    NetBox id of the choice set.
    lastUpdated string
    name string
    orderAlphabetically boolean
    Sort choices alphabetically instead of by definition order.
    ownerId number
    Id of the owner the object is assigned to.
    url string
    choice string
    Choice to match.
    choiceColor string
    Choice colors.
    ownerGroupId number
    Id of the owner group.
    ownerGroupName string
    Name of the owner group.
    ownerName 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[GetCustomFieldChoiceSetExtraChoice]
    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_id float
    Id of the owner group.
    owner_group_name str
    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.
    baseChoices String
    Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
    choiceColors 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.
    choicesCount Number
    created String
    description String
    extraChoices List<Property Map>
    Additional choices as value/label pairs.
    id Number
    NetBox id of the choice set.
    lastUpdated String
    name String
    orderAlphabetically Boolean
    Sort choices alphabetically instead of by definition order.
    ownerId Number
    Id of the owner the object is assigned to.
    url String
    choice String
    Choice to match.
    choiceColor String
    Choice colors.
    ownerGroupId Number
    Id of the owner group.
    ownerGroupName String
    Name of the owner group.
    ownerName String
    Name of the owner.
    q String
    Search term, matched against the fields NetBox searches for this object type.

    Supporting Types

    GetCustomFieldChoiceSetExtraChoice

    Label string
    Value string
    Label string
    Value string
    label string
    value string
    label String
    value String
    label string
    value string
    label str
    value str
    label String
    value String

    Package Details

    Repository
    netbox e-breuninger/terraform-provider-netbox
    License
    Notes
    This Pulumi package is based on the netbox Terraform Provider.
    netbox
    Viewing docs for netbox 6.0.1
    published on Monday, Nov 16, 2026 by e-breuninger

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial