published on Monday, Nov 16, 2026 by e-breuninger
published on Monday, Nov 16, 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
- Owner
Id double - Id of the owner the object is assigned to.
- Schema string
- JSON schema the config contexts with this profile must satisfy (use jsonencode()).
- 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
- Owner
Id float64 - Id of the owner the object is assigned to.
- Schema string
- JSON schema the config contexts with this profile must satisfy (use jsonencode()).
- []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()).
- 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
- owner
Id Double - Id of the owner the object is assigned to.
- schema String
- JSON schema the config contexts with this profile must satisfy (use jsonencode()).
- 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
- 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()).
- 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()).
- 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
- 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()).
- 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:
- Config
Context doubleProfile Id - NetBox id.
- Created string
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated string - List<string>
- Slugs of all tags on the object, including the provider's default_tags.
- Url string
- Config
Context float64Profile Id - NetBox id.
- Created string
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated string - []string
- Slugs of all tags on the object, including the provider's default_tags.
- Url string
- config_
context_ numberprofile_ id - NetBox id.
- created string
- id string
- The provider-assigned unique ID for this managed resource.
- last_
updated string - list(string)
- Slugs of all tags on the object, including the provider's default_tags.
- url string
- config
Context DoubleProfile Id - NetBox id.
- created String
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated String - List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- url String
- config
Context numberProfile Id - NetBox id.
- created string
- id string
- The provider-assigned unique ID for this managed resource.
- last
Updated string - string[]
- Slugs of all tags on the object, including the provider's default_tags.
- url string
- config_
context_ floatprofile_ id - NetBox id.
- created str
- id str
- The provider-assigned unique ID for this managed resource.
- last_
updated str - Sequence[str]
- Slugs of all tags on the object, including the provider's default_tags.
- url str
- config
Context NumberProfile Id - NetBox id.
- created String
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated String - 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) -> ConfigContextProfilefunc 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: existingConfigContextProfile: type: netbox:ConfigContextProfile get: id: ${id}import {
to = netbox_config_context_profile.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 ConfigContextProfileState
- 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 ConfigContextProfileState
- 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 ConfigContextProfileState
- 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 ConfigContextProfileState
- 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
- Config
Context doubleProfile Id - NetBox id.
- Created string
- Description string
- Last
Updated string - Name string
- Owner
Id double - Id of the owner the object is assigned to.
- Schema string
- JSON schema the config contexts with this profile must satisfy (use jsonencode()).
- List<string>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<string>
- Slugs of all tags on the object, including the provider's default_tags.
- Url string
- Comments string
- Config
Context float64Profile Id - NetBox id.
- Created string
- Description string
- Last
Updated string - Name string
- Owner
Id float64 - Id of the owner the object is assigned to.
- Schema string
- JSON schema the config contexts with this profile must satisfy (use jsonencode()).
- []string
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- []string
- Slugs of all tags on the object, including the provider's default_tags.
- Url string
- comments string
- config_
context_ numberprofile_ id - 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()).
- list(string)
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- list(string)
- Slugs of all tags on the object, including the provider's default_tags.
- url string
- comments String
- config
Context DoubleProfile Id - NetBox id.
- created String
- description String
- last
Updated String - name String
- owner
Id Double - Id of the owner the object is assigned to.
- schema String
- JSON schema the config contexts with this profile must satisfy (use jsonencode()).
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- url String
- comments string
- config
Context numberProfile Id - 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()).
- string[]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- string[]
- Slugs of all tags on the object, including the provider's default_tags.
- url string
- comments str
- config_
context_ floatprofile_ id - 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()).
- Sequence[str]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- Sequence[str]
- Slugs of all tags on the object, including the provider's default_tags.
- url str
- comments String
- config
Context NumberProfile Id - 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()).
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- 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
netboxTerraform Provider.
published on Monday, Nov 16, 2026 by e-breuninger