1. Registry
  2. Packages
  3. Netbox Provider
  4. API Docs
  5. Owner
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 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)
    public Owner(String name, OwnerArgs args)
    public Owner(String name, OwnerArgs args, CustomResourceOptions options)
    
    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
    OwnerGroupId double
    Id of the owner group the owner belongs to.
    UserGroupIds List<double>
    Ids of the user groups that make up the owner.
    UserIds List<double>
    Ids of the users that make up the owner.
    Description string
    Name string
    OwnerGroupId float64
    Id of the owner group the owner belongs to.
    UserGroupIds []float64
    Ids of the user groups that make up the owner.
    UserIds []float64
    Ids of the users that make up the owner.
    description string
    name string
    owner_group_id number
    Id of the owner group the owner belongs to.
    user_group_ids list(number)
    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
    ownerGroupId Double
    Id of the owner group the owner belongs to.
    userGroupIds List<Double>
    Ids of the user groups that make up the owner.
    userIds List<Double>
    Ids of the users that make up the owner.
    description string
    name string
    ownerGroupId number
    Id of the owner group the owner belongs to.
    userGroupIds number[]
    Ids of the user groups that make up the owner.
    userIds number[]
    Ids of the users that make up the owner.
    description str
    name str
    owner_group_id float
    Id of the owner group the owner belongs to.
    user_group_ids Sequence[float]
    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
    ownerGroupId Number
    Id of the owner group the owner belongs to.
    userGroupIds List<Number>
    Ids of the user groups that make up the owner.
    userIds 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:

    Id string
    The provider-assigned unique ID for this managed resource.
    OwnerId double
    NetBox id.
    Url string
    Id string
    The provider-assigned unique ID for this managed resource.
    OwnerId float64
    NetBox id.
    Url string
    id string
    The provider-assigned unique ID for this managed resource.
    owner_id number
    NetBox id.
    url string
    id String
    The provider-assigned unique ID for this managed resource.
    ownerId Double
    NetBox id.
    url String
    id string
    The provider-assigned unique ID for this managed resource.
    ownerId number
    NetBox id.
    url string
    id str
    The provider-assigned unique ID for this managed resource.
    owner_id float
    NetBox id.
    url str
    id String
    The provider-assigned unique ID for this managed resource.
    ownerId Number
    NetBox id.
    url String

    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) -> Owner
    func 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:  existingOwner:    type: netbox:Owner    get:      id: ${id}
    import {
      to = netbox_owner.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 OwnerState
    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 OwnerState
    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 OwnerState
    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 OwnerState
    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.
    The following state arguments are supported:
    Description string
    Name string
    OwnerGroupId double
    Id of the owner group the owner belongs to.
    OwnerId double
    NetBox id.
    Url string
    UserGroupIds List<double>
    Ids of the user groups that make up the owner.
    UserIds List<double>
    Ids of the users that make up the owner.
    Description string
    Name string
    OwnerGroupId float64
    Id of the owner group the owner belongs to.
    OwnerId float64
    NetBox id.
    Url string
    UserGroupIds []float64
    Ids of the user groups that make up the owner.
    UserIds []float64
    Ids of the users that make up the owner.
    description string
    name string
    owner_group_id number
    Id of the owner group the owner belongs to.
    owner_id number
    NetBox id.
    url string
    user_group_ids list(number)
    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
    ownerGroupId Double
    Id of the owner group the owner belongs to.
    ownerId Double
    NetBox id.
    url String
    userGroupIds List<Double>
    Ids of the user groups that make up the owner.
    userIds List<Double>
    Ids of the users that make up the owner.
    description string
    name string
    ownerGroupId number
    Id of the owner group the owner belongs to.
    ownerId number
    NetBox id.
    url string
    userGroupIds number[]
    Ids of the user groups that make up the owner.
    userIds number[]
    Ids of the users that make up the owner.
    description str
    name str
    owner_group_id float
    Id of the owner group the owner belongs to.
    owner_id float
    NetBox id.
    url str
    user_group_ids Sequence[float]
    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
    ownerGroupId Number
    Id of the owner group the owner belongs to.
    ownerId Number
    NetBox id.
    url String
    userGroupIds List<Number>
    Ids of the user groups that make up the owner.
    userIds 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 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