1. Registry
  2. Packages
  3. Netbox Provider
  4. API Docs
  5. ConfigContextProfile
Viewing docs for netbox 6.0.0
published on Wednesday, Nov 4, 2026 by e-breuninger
netbox
Viewing docs for netbox 6.0.0
published on Wednesday, Nov 4, 2026 by e-breuninger

    A NetBox config context profile (extras.configcontextprofile): a JSON schema for the config contexts that use it.

    From the official documentation:

    Profiles can be used to organize configuration contexts and to enforce a desired structure for their data. The latter is achieved by defining a JSON schema to which all config contexts assigned to the profile must comply. Any context whose data fails validation against the profile’s schema cannot be saved.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    const test = new netbox.ConfigContextProfile("test", {
        name: "test-config-context-profile",
        description: "test-description",
        schema: JSON.stringify({
            properties: {
                ntp_servers: {
                    type: "array",
                },
            },
        }),
    });
    
    import pulumi
    import json
    import pulumi_netbox as netbox
    
    test = netbox.ConfigContextProfile("test",
        name="test-config-context-profile",
        description="test-description",
        schema=json.dumps({
            "properties": {
                "ntp_servers": {
                    "type": "array",
                },
            },
        }))
    
    package main
    
    import (
    	"encoding/json"
    
    	"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 {
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"properties": map[string]interface{}{
    				"ntp_servers": map[string]interface{}{
    					"type": "array",
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		_, err = netbox.NewConfigContextProfile(ctx, "test", &netbox.ConfigContextProfileArgs{
    			Name:        pulumi.String("test-config-context-profile"),
    			Description: pulumi.String("test-description"),
    			Schema:      pulumi.String(json0),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Netbox = Pulumi.Netbox;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Netbox.ConfigContextProfile("test", new()
        {
            Name = "test-config-context-profile",
            Description = "test-description",
            Schema = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["properties"] = new Dictionary<string, object?>
                {
                    ["ntp_servers"] = new Dictionary<string, object?>
                    {
                        ["type"] = "array",
                    },
                },
            }),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.netbox.ConfigContextProfile;
    import com.pulumi.netbox.ConfigContextProfileArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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 ConfigContextProfile("test", ConfigContextProfileArgs.builder()
                .name("test-config-context-profile")
                .description("test-description")
                .schema(serializeJson(
                    jsonObject(
                        jsonProperty("properties", jsonObject(
                            jsonProperty("ntp_servers", jsonObject(
                                jsonProperty("type", "array")
                            ))
                        ))
                    )))
                .build());
    
        }
    }
    
    resources:
      test:
        type: netbox:ConfigContextProfile
        properties:
          name: test-config-context-profile
          description: test-description
          schema:
            fn::toJSON:
              properties:
                ntp_servers:
                  type: array
    
    Example coming soon!
    

    Create ConfigContextProfile Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ConfigContextProfile(name: string, args?: ConfigContextProfileArgs, opts?: CustomResourceOptions);
    @overload
    def ConfigContextProfile(resource_name: str,
                             args: Optional[ConfigContextProfileArgs] = None,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def ConfigContextProfile(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             comments: Optional[str] = None,
                             description: Optional[str] = None,
                             name: Optional[str] = None,
                             owner_id: Optional[float] = None,
                             schema: Optional[str] = None,
                             tags: Optional[Sequence[str]] = None)
    func NewConfigContextProfile(ctx *Context, name string, args *ConfigContextProfileArgs, opts ...ResourceOption) (*ConfigContextProfile, error)
    public ConfigContextProfile(string name, ConfigContextProfileArgs? args = null, CustomResourceOptions? opts = null)
    public ConfigContextProfile(String name, ConfigContextProfileArgs args)
    public ConfigContextProfile(String name, ConfigContextProfileArgs args, CustomResourceOptions options)
    
    type: netbox:ConfigContextProfile
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "netbox_config_context_profile" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ConfigContextProfileArgs
    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 ConfigContextProfileArgs
    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 ConfigContextProfileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ConfigContextProfileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ConfigContextProfileArgs
    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 configContextProfileResource = new Netbox.ConfigContextProfile("configContextProfileResource", new()
    {
        Comments = "string",
        Description = "string",
        Name = "string",
        OwnerId = 0.0,
        Schema = "string",
        Tags = new[]
        {
            "string",
        },
    });
    
    example, err := netbox.NewConfigContextProfile(ctx, "configContextProfileResource", &netbox.ConfigContextProfileArgs{
    	Comments:    pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	OwnerId:     pulumi.Float64(0),
    	Schema:      pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    resource "netbox_config_context_profile" "configContextProfileResource" {
      lifecycle {
        create_before_destroy = true
      }
      comments    = "string"
      description = "string"
      name        = "string"
      owner_id    = 0
      schema      = "string"
      tags        = ["string"]
    }
    
    var configContextProfileResource = new ConfigContextProfile("configContextProfileResource", ConfigContextProfileArgs.builder()
        .comments("string")
        .description("string")
        .name("string")
        .ownerId(0.0)
        .schema("string")
        .tags("string")
        .build());
    
    config_context_profile_resource = netbox.ConfigContextProfile("configContextProfileResource",
        comments="string",
        description="string",
        name="string",
        owner_id=float(0),
        schema="string",
        tags=["string"])
    
    const configContextProfileResource = new netbox.ConfigContextProfile("configContextProfileResource", {
        comments: "string",
        description: "string",
        name: "string",
        ownerId: 0,
        schema: "string",
        tags: ["string"],
    });
    
    type: netbox:ConfigContextProfile
    properties:
        comments: string
        description: string
        name: string
        ownerId: 0
        schema: string
        tags:
            - string
    

    ConfigContextProfile 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 ConfigContextProfile resource accepts the following input properties:

    Comments string
    Description string
    Name string
    OwnerId double
    Id of the owner the object is assigned to.
    Schema string
    JSON schema the config contexts with this profile must satisfy (use jsonencode()).
    Tags List<string>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    Comments string
    Description string
    Name string
    OwnerId float64
    Id of the owner the object is assigned to.
    Schema string
    JSON schema the config contexts with this profile must satisfy (use jsonencode()).
    Tags []string
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    comments string
    description string
    name string
    owner_id number
    Id of the owner the object is assigned to.
    schema string
    JSON schema the config contexts with this profile must satisfy (use jsonencode()).
    tags list(string)
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    comments String
    description String
    name String
    ownerId Double
    Id of the owner the object is assigned to.
    schema String
    JSON schema the config contexts with this profile must satisfy (use jsonencode()).
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    comments string
    description string
    name string
    ownerId number
    Id of the owner the object is assigned to.
    schema string
    JSON schema the config contexts with this profile must satisfy (use jsonencode()).
    tags string[]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    comments str
    description str
    name str
    owner_id float
    Id of the owner the object is assigned to.
    schema str
    JSON schema the config contexts with this profile must satisfy (use jsonencode()).
    tags Sequence[str]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    comments String
    description String
    name String
    ownerId Number
    Id of the owner the object is assigned to.
    schema String
    JSON schema the config contexts with this profile must satisfy (use jsonencode()).
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ConfigContextProfile resource produces the following output properties:

    ConfigContextProfileId double
    NetBox id.
    Created string
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    TagsAlls List<string>
    Slugs of all tags on the object, including the provider's default_tags.
    Url string
    ConfigContextProfileId float64
    NetBox id.
    Created string
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    TagsAlls []string
    Slugs of all tags on the object, including the provider's default_tags.
    Url string
    config_context_profile_id number
    NetBox id.
    created string
    id string
    The provider-assigned unique ID for this managed resource.
    last_updated string
    tags_alls list(string)
    Slugs of all tags on the object, including the provider's default_tags.
    url string
    configContextProfileId Double
    NetBox id.
    created String
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    url String
    configContextProfileId number
    NetBox id.
    created string
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdated string
    tagsAlls string[]
    Slugs of all tags on the object, including the provider's default_tags.
    url string
    config_context_profile_id float
    NetBox id.
    created str
    id str
    The provider-assigned unique ID for this managed resource.
    last_updated str
    tags_alls Sequence[str]
    Slugs of all tags on the object, including the provider's default_tags.
    url str
    configContextProfileId Number
    NetBox id.
    created String
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    url String

    Look up Existing ConfigContextProfile Resource

    Get an existing ConfigContextProfile 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?: ConfigContextProfileState, opts?: CustomResourceOptions): ConfigContextProfile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            comments: Optional[str] = None,
            config_context_profile_id: Optional[float] = None,
            created: Optional[str] = None,
            description: Optional[str] = None,
            last_updated: Optional[str] = None,
            name: Optional[str] = None,
            owner_id: Optional[float] = None,
            schema: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            tags_alls: Optional[Sequence[str]] = None,
            url: Optional[str] = None) -> ConfigContextProfile
    func GetConfigContextProfile(ctx *Context, name string, id IDInput, state *ConfigContextProfileState, opts ...ResourceOption) (*ConfigContextProfile, error)
    public static ConfigContextProfile Get(string name, Input<string> id, ConfigContextProfileState? state, CustomResourceOptions? opts = null)
    public static ConfigContextProfile get(String name, Output<String> id, ConfigContextProfileState state, CustomResourceOptions options)
    resources:  _:    type: netbox:ConfigContextProfile    get:      id: ${id}
    import {
      to = netbox_config_context_profile.example
      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.
    The following state arguments are supported:
    Comments string
    ConfigContextProfileId double
    NetBox id.
    Created string
    Description string
    LastUpdated string
    Name string
    OwnerId double
    Id of the owner the object is assigned to.
    Schema string
    JSON schema the config contexts with this profile must satisfy (use jsonencode()).
    Tags List<string>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    TagsAlls List<string>
    Slugs of all tags on the object, including the provider's default_tags.
    Url string
    Comments string
    ConfigContextProfileId float64
    NetBox id.
    Created string
    Description string
    LastUpdated string
    Name string
    OwnerId float64
    Id of the owner the object is assigned to.
    Schema string
    JSON schema the config contexts with this profile must satisfy (use jsonencode()).
    Tags []string
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    TagsAlls []string
    Slugs of all tags on the object, including the provider's default_tags.
    Url string
    comments string
    config_context_profile_id number
    NetBox id.
    created string
    description string
    last_updated string
    name string
    owner_id number
    Id of the owner the object is assigned to.
    schema string
    JSON schema the config contexts with this profile must satisfy (use jsonencode()).
    tags list(string)
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tags_alls list(string)
    Slugs of all tags on the object, including the provider's default_tags.
    url string
    comments String
    configContextProfileId Double
    NetBox id.
    created String
    description String
    lastUpdated String
    name String
    ownerId Double
    Id of the owner the object is assigned to.
    schema String
    JSON schema the config contexts with this profile must satisfy (use jsonencode()).
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    url String
    comments string
    configContextProfileId number
    NetBox id.
    created string
    description string
    lastUpdated string
    name string
    ownerId number
    Id of the owner the object is assigned to.
    schema string
    JSON schema the config contexts with this profile must satisfy (use jsonencode()).
    tags string[]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tagsAlls string[]
    Slugs of all tags on the object, including the provider's default_tags.
    url string
    comments str
    config_context_profile_id float
    NetBox id.
    created str
    description str
    last_updated str
    name str
    owner_id float
    Id of the owner the object is assigned to.
    schema str
    JSON schema the config contexts with this profile must satisfy (use jsonencode()).
    tags Sequence[str]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tags_alls Sequence[str]
    Slugs of all tags on the object, including the provider's default_tags.
    url str
    comments String
    configContextProfileId Number
    NetBox id.
    created String
    description String
    lastUpdated String
    name String
    ownerId Number
    Id of the owner the object is assigned to.
    schema String
    JSON schema the config contexts with this profile must satisfy (use jsonencode()).
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    url String

    Import

    In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:

    terraform

    import {

    to = netbox_config_context_profile.test

    id = “123”

    }

    The pulumi import command can be used, for example:

    $ pulumi import netbox:index/configContextProfile:ConfigContextProfile 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 netbox Terraform Provider.
    netbox
    Viewing docs for netbox 6.0.0
    published on Wednesday, Nov 4, 2026 by e-breuninger

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial