published on Wednesday, Nov 4, 2026 by e-breuninger
published on Wednesday, Nov 4, 2026 by e-breuninger
A NetBox owner (users.owner): the users and groups an object can be assigned to as its owner.
From the official documentation:
An owner is a set of users and/or groups who are responsible for the administration of certain resources within NetBox. The users and groups assigned to an owner are referred to as its members. Owner assignments are useful for indicating which parties are responsible for the administration of a particular object.
Most objects within NetBox can be assigned an owner, although this is not required.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const test = new netbox.OwnerGroup("test", {name: "test-owner-group"});
const testGroup = new netbox.Group("test", {name: "test-group"});
const testUser = new netbox.User("test", {
username: "test-user",
password: "test-password",
});
const testOwner = new netbox.Owner("test", {
name: "test-owner",
ownerGroupId: test.ownerGroupId,
userIds: [testUser.userId],
userGroupIds: [testGroup.groupId],
description: "test-description",
});
import pulumi
import pulumi_netbox as netbox
test = netbox.OwnerGroup("test", name="test-owner-group")
test_group = netbox.Group("test", name="test-group")
test_user = netbox.User("test",
username="test-user",
password="test-password")
test_owner = netbox.Owner("test",
name="test-owner",
owner_group_id=test.owner_group_id,
user_ids=[test_user.user_id],
user_group_ids=[test_group.group_id],
description="test-description")
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 {
test, err := netbox.NewOwnerGroup(ctx, "test", &netbox.OwnerGroupArgs{
Name: pulumi.String("test-owner-group"),
})
if err != nil {
return err
}
testGroup, err := netbox.NewGroup(ctx, "test", &netbox.GroupArgs{
Name: pulumi.String("test-group"),
})
if err != nil {
return err
}
testUser, err := netbox.NewUser(ctx, "test", &netbox.UserArgs{
Username: pulumi.String("test-user"),
Password: pulumi.String("test-password"),
})
if err != nil {
return err
}
_, err = netbox.NewOwner(ctx, "test", &netbox.OwnerArgs{
Name: pulumi.String("test-owner"),
OwnerGroupId: test.OwnerGroupId,
UserIds: pulumi.Float64Array{
testUser.UserId,
},
UserGroupIds: pulumi.Float64Array{
testGroup.GroupId,
},
Description: pulumi.String("test-description"),
})
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 = new Netbox.OwnerGroup("test", new()
{
Name = "test-owner-group",
});
var testGroup = new Netbox.Group("test", new()
{
Name = "test-group",
});
var testUser = new Netbox.User("test", new()
{
Username = "test-user",
Password = "test-password",
});
var testOwner = new Netbox.Owner("test", new()
{
Name = "test-owner",
OwnerGroupId = test.OwnerGroupId,
UserIds = new[]
{
testUser.UserId,
},
UserGroupIds = new[]
{
testGroup.GroupId,
},
Description = "test-description",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.OwnerGroup;
import com.pulumi.netbox.OwnerGroupArgs;
import com.pulumi.netbox.Group;
import com.pulumi.netbox.GroupArgs;
import com.pulumi.netbox.User;
import com.pulumi.netbox.UserArgs;
import com.pulumi.netbox.Owner;
import com.pulumi.netbox.OwnerArgs;
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 OwnerGroup("test", OwnerGroupArgs.builder()
.name("test-owner-group")
.build());
var testGroup = new Group("testGroup", GroupArgs.builder()
.name("test-group")
.build());
var testUser = new User("testUser", UserArgs.builder()
.username("test-user")
.password("test-password")
.build());
var testOwner = new Owner("testOwner", OwnerArgs.builder()
.name("test-owner")
.ownerGroupId(test.ownerGroupId())
.userIds(testUser.userId())
.userGroupIds(testGroup.groupId())
.description("test-description")
.build());
}
}
resources:
test:
type: netbox:OwnerGroup
properties:
name: test-owner-group
testGroup:
type: netbox:Group
name: test
properties:
name: test-group
testUser:
type: netbox:User
name: test
properties:
username: test-user
password: test-password
testOwner:
type: netbox:Owner
name: test
properties:
name: test-owner
ownerGroupId: ${test.ownerGroupId}
userIds:
- ${testUser.userId}
userGroupIds:
- ${testGroup.groupId}
description: test-description
Example coming soon!
Create Owner Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Owner(name: string, args?: OwnerArgs, opts?: CustomResourceOptions);@overload
def Owner(resource_name: str,
args: Optional[OwnerArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Owner(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
name: Optional[str] = None,
owner_group_id: Optional[float] = None,
user_group_ids: Optional[Sequence[float]] = None,
user_ids: Optional[Sequence[float]] = None)func NewOwner(ctx *Context, name string, args *OwnerArgs, opts ...ResourceOption) (*Owner, error)public Owner(string name, OwnerArgs? args = null, CustomResourceOptions? opts = null)type: netbox:Owner
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "netbox_owner" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args OwnerArgs
- 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 OwnerArgs
- 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 OwnerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OwnerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OwnerArgs
- 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 ownerResource = new Netbox.Owner("ownerResource", new()
{
Description = "string",
Name = "string",
OwnerGroupId = 0.0,
UserGroupIds = new[]
{
0.0,
},
UserIds = new[]
{
0.0,
},
});
example, err := netbox.NewOwner(ctx, "ownerResource", &netbox.OwnerArgs{
Description: pulumi.String("string"),
Name: pulumi.String("string"),
OwnerGroupId: pulumi.Float64(0),
UserGroupIds: pulumi.Float64Array{
pulumi.Float64(0),
},
UserIds: pulumi.Float64Array{
pulumi.Float64(0),
},
})
resource "netbox_owner" "ownerResource" {
lifecycle {
create_before_destroy = true
}
description = "string"
name = "string"
owner_group_id = 0
user_group_ids = [0]
user_ids = [0]
}
var ownerResource = new Owner("ownerResource", OwnerArgs.builder()
.description("string")
.name("string")
.ownerGroupId(0.0)
.userGroupIds(0.0)
.userIds(0.0)
.build());
owner_resource = netbox.Owner("ownerResource",
description="string",
name="string",
owner_group_id=float(0),
user_group_ids=[float(0)],
user_ids=[float(0)])
const ownerResource = new netbox.Owner("ownerResource", {
description: "string",
name: "string",
ownerGroupId: 0,
userGroupIds: [0],
userIds: [0],
});
type: netbox:Owner
properties:
description: string
name: string
ownerGroupId: 0
userGroupIds:
- 0
userIds:
- 0
Owner 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 Owner resource accepts the following input properties:
- Description string
- Name string
- Owner
Group doubleId - Id of the owner group the owner belongs to.
- User
Group List<double>Ids - Ids of the user groups that make up the owner.
- User
Ids List<double> - Ids of the users that make up the owner.
- Description string
- Name string
- Owner
Group float64Id - Id of the owner group the owner belongs to.
- User
Group []float64Ids - Ids of the user groups that make up the owner.
- User
Ids []float64 - Ids of the users that make up the owner.
- description string
- name string
- owner_
group_ numberid - Id of the owner group the owner belongs to.
- user_
group_ list(number)ids - Ids of the user groups that make up the owner.
- user_
ids list(number) - Ids of the users that make up the owner.
- description String
- name String
- owner
Group DoubleId - Id of the owner group the owner belongs to.
- user
Group List<Double>Ids - Ids of the user groups that make up the owner.
- user
Ids List<Double> - Ids of the users that make up the owner.
- description string
- name string
- owner
Group numberId - Id of the owner group the owner belongs to.
- user
Group number[]Ids - Ids of the user groups that make up the owner.
- user
Ids number[] - Ids of the users that make up the owner.
- description str
- name str
- owner_
group_ floatid - Id of the owner group the owner belongs to.
- user_
group_ Sequence[float]ids - Ids of the user groups that make up the owner.
- user_
ids Sequence[float] - Ids of the users that make up the owner.
- description String
- name String
- owner
Group NumberId - Id of the owner group the owner belongs to.
- user
Group List<Number>Ids - Ids of the user groups that make up the owner.
- user
Ids List<Number> - Ids of the users that make up the owner.
Outputs
All input properties are implicitly available as output properties. Additionally, the Owner resource produces the following output properties:
Look up Existing Owner Resource
Get an existing Owner 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?: OwnerState, opts?: CustomResourceOptions): Owner@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
name: Optional[str] = None,
owner_group_id: Optional[float] = None,
owner_id: Optional[float] = None,
url: Optional[str] = None,
user_group_ids: Optional[Sequence[float]] = None,
user_ids: Optional[Sequence[float]] = None) -> Ownerfunc GetOwner(ctx *Context, name string, id IDInput, state *OwnerState, opts ...ResourceOption) (*Owner, error)public static Owner Get(string name, Input<string> id, OwnerState? state, CustomResourceOptions? opts = null)public static Owner get(String name, Output<String> id, OwnerState state, CustomResourceOptions options)resources: _: type: netbox:Owner get: id: ${id}import {
to = netbox_owner.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.
- Description string
- Name string
- Owner
Group doubleId - Id of the owner group the owner belongs to.
- Owner
Id double - NetBox id.
- Url string
- User
Group List<double>Ids - Ids of the user groups that make up the owner.
- User
Ids List<double> - Ids of the users that make up the owner.
- Description string
- Name string
- Owner
Group float64Id - Id of the owner group the owner belongs to.
- Owner
Id float64 - NetBox id.
- Url string
- User
Group []float64Ids - Ids of the user groups that make up the owner.
- User
Ids []float64 - Ids of the users that make up the owner.
- description string
- name string
- owner_
group_ numberid - Id of the owner group the owner belongs to.
- owner_
id number - NetBox id.
- url string
- user_
group_ list(number)ids - Ids of the user groups that make up the owner.
- user_
ids list(number) - Ids of the users that make up the owner.
- description String
- name String
- owner
Group DoubleId - Id of the owner group the owner belongs to.
- owner
Id Double - NetBox id.
- url String
- user
Group List<Double>Ids - Ids of the user groups that make up the owner.
- user
Ids List<Double> - Ids of the users that make up the owner.
- description string
- name string
- owner
Group numberId - Id of the owner group the owner belongs to.
- owner
Id number - NetBox id.
- url string
- user
Group number[]Ids - Ids of the user groups that make up the owner.
- user
Ids number[] - Ids of the users that make up the owner.
- description str
- name str
- owner_
group_ floatid - Id of the owner group the owner belongs to.
- owner_
id float - NetBox id.
- url str
- user_
group_ Sequence[float]ids - Ids of the user groups that make up the owner.
- user_
ids Sequence[float] - Ids of the users that make up the owner.
- description String
- name String
- owner
Group NumberId - Id of the owner group the owner belongs to.
- owner
Id Number - NetBox id.
- url String
- user
Group List<Number>Ids - Ids of the user groups that make up the owner.
- user
Ids List<Number> - Ids of the users that make up the owner.
Import
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
terraform
import {
to = netbox_owner.test
id = “123”
}
The pulumi import command can be used, for example:
$ pulumi import netbox:index/owner:Owner 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 Wednesday, Nov 4, 2026 by e-breuninger