published on Wednesday, Apr 29, 2026 by Pulumi
published on Wednesday, Apr 29, 2026 by Pulumi
Manage owners for a group in bulk. Uses the groupId as the resource ID. The resource is authoritative: any owners on the group not declared in configuration will be removed.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";
const owner1 = new okta.user.User("owner1", {
firstName: "Alice",
lastName: "Owner",
login: "alice-owner@example.com",
email: "alice-owner@example.com",
});
const owner2 = new okta.user.User("owner2", {
firstName: "Bob",
lastName: "Owner",
login: "bob-owner@example.com",
email: "bob-owner@example.com",
});
const grp = new okta.group.Group("grp", {name: "demo-group"});
const owners = new okta.group.Owners("owners", {
groupId: grp.id,
owners: [
{
type: "USER",
id: owner1.id,
},
{
type: "USER",
id: owner2.id,
},
],
});
import pulumi
import pulumi_okta as okta
owner1 = okta.user.User("owner1",
first_name="Alice",
last_name="Owner",
login="alice-owner@example.com",
email="alice-owner@example.com")
owner2 = okta.user.User("owner2",
first_name="Bob",
last_name="Owner",
login="bob-owner@example.com",
email="bob-owner@example.com")
grp = okta.group.Group("grp", name="demo-group")
owners = okta.group.Owners("owners",
group_id=grp.id,
owners=[
{
"type": "USER",
"id": owner1.id,
},
{
"type": "USER",
"id": owner2.id,
},
])
package main
import (
"github.com/pulumi/pulumi-okta/sdk/v6/go/okta/group"
"github.com/pulumi/pulumi-okta/sdk/v6/go/okta/user"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
owner1, err := user.NewUser(ctx, "owner1", &user.UserArgs{
FirstName: pulumi.String("Alice"),
LastName: pulumi.String("Owner"),
Login: pulumi.String("alice-owner@example.com"),
Email: pulumi.String("alice-owner@example.com"),
})
if err != nil {
return err
}
owner2, err := user.NewUser(ctx, "owner2", &user.UserArgs{
FirstName: pulumi.String("Bob"),
LastName: pulumi.String("Owner"),
Login: pulumi.String("bob-owner@example.com"),
Email: pulumi.String("bob-owner@example.com"),
})
if err != nil {
return err
}
grp, err := group.NewGroup(ctx, "grp", &group.GroupArgs{
Name: pulumi.String("demo-group"),
})
if err != nil {
return err
}
_, err = group.NewOwners(ctx, "owners", &group.OwnersArgs{
GroupId: grp.ID(),
Owners: group.OwnersOwnerArray{
&group.OwnersOwnerArgs{
Type: pulumi.String("USER"),
Id: owner1.ID(),
},
&group.OwnersOwnerArgs{
Type: pulumi.String("USER"),
Id: owner2.ID(),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Okta = Pulumi.Okta;
return await Deployment.RunAsync(() =>
{
var owner1 = new Okta.User.User("owner1", new()
{
FirstName = "Alice",
LastName = "Owner",
Login = "alice-owner@example.com",
Email = "alice-owner@example.com",
});
var owner2 = new Okta.User.User("owner2", new()
{
FirstName = "Bob",
LastName = "Owner",
Login = "bob-owner@example.com",
Email = "bob-owner@example.com",
});
var grp = new Okta.Group.Group("grp", new()
{
Name = "demo-group",
});
var owners = new Okta.Group.Owners("owners", new()
{
GroupId = grp.Id,
OwnerList = new[]
{
new Okta.Group.Inputs.OwnersOwnerArgs
{
Type = "USER",
Id = owner1.Id,
},
new Okta.Group.Inputs.OwnersOwnerArgs
{
Type = "USER",
Id = owner2.Id,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.okta.user.User;
import com.pulumi.okta.user.UserArgs;
import com.pulumi.okta.group.Group;
import com.pulumi.okta.group.GroupArgs;
import com.pulumi.okta.group.Owners;
import com.pulumi.okta.group.OwnersArgs;
import com.pulumi.okta.group.inputs.OwnersOwnerArgs;
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 owner1 = new User("owner1", UserArgs.builder()
.firstName("Alice")
.lastName("Owner")
.login("alice-owner@example.com")
.email("alice-owner@example.com")
.build());
var owner2 = new User("owner2", UserArgs.builder()
.firstName("Bob")
.lastName("Owner")
.login("bob-owner@example.com")
.email("bob-owner@example.com")
.build());
var grp = new Group("grp", GroupArgs.builder()
.name("demo-group")
.build());
var owners = new Owners("owners", OwnersArgs.builder()
.groupId(grp.id())
.owners(
OwnersOwnerArgs.builder()
.type("USER")
.id(owner1.id())
.build(),
OwnersOwnerArgs.builder()
.type("USER")
.id(owner2.id())
.build())
.build());
}
}
resources:
owner1:
type: okta:user:User
properties:
firstName: Alice
lastName: Owner
login: alice-owner@example.com
email: alice-owner@example.com
owner2:
type: okta:user:User
properties:
firstName: Bob
lastName: Owner
login: bob-owner@example.com
email: bob-owner@example.com
grp:
type: okta:group:Group
properties:
name: demo-group
owners:
type: okta:group:Owners
properties:
groupId: ${grp.id}
owners:
- type: USER
id: ${owner1.id}
- type: USER
id: ${owner2.id}
Example coming soon!
Create Owners Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Owners(name: string, args: OwnersArgs, opts?: CustomResourceOptions);@overload
def Owners(resource_name: str,
args: OwnersArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Owners(resource_name: str,
opts: Optional[ResourceOptions] = None,
group_id: Optional[str] = None,
owners: Optional[Sequence[OwnersOwnerArgs]] = None)func NewOwners(ctx *Context, name string, args OwnersArgs, opts ...ResourceOption) (*Owners, error)public Owners(string name, OwnersArgs args, CustomResourceOptions? opts = null)
public Owners(String name, OwnersArgs args)
public Owners(String name, OwnersArgs args, CustomResourceOptions options)
type: okta:group:Owners
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "okta_group_owners" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args OwnersArgs
- 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 OwnersArgs
- 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 OwnersArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OwnersArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OwnersArgs
- 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 ownersResource = new Okta.Group.Owners("ownersResource", new()
{
GroupId = "string",
OwnerList = new[]
{
new Okta.Group.Inputs.OwnersOwnerArgs
{
Id = "string",
Type = "string",
},
},
});
example, err := group.NewOwners(ctx, "ownersResource", &group.OwnersArgs{
GroupId: pulumi.String("string"),
Owners: group.OwnersOwnerArray{
&group.OwnersOwnerArgs{
Id: pulumi.String("string"),
Type: pulumi.String("string"),
},
},
})
resource "okta_group_owners" "ownersResource" {
group_id = "string"
owners {
id = "string"
type = "string"
}
}
var ownersResource = new Owners("ownersResource", OwnersArgs.builder()
.groupId("string")
.owners(OwnersOwnerArgs.builder()
.id("string")
.type("string")
.build())
.build());
owners_resource = okta.group.Owners("ownersResource",
group_id="string",
owners=[{
"id": "string",
"type": "string",
}])
const ownersResource = new okta.group.Owners("ownersResource", {
groupId: "string",
owners: [{
id: "string",
type: "string",
}],
});
type: okta:group:Owners
properties:
groupId: string
owners:
- id: string
type: string
Owners 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 Owners resource accepts the following input properties:
- Group
Id string - The ID of the Okta group.
- Owner
List List<OwnersOwner> - Desired owners for the group.
- Group
Id string - The ID of the Okta group.
- Owners
[]Owners
Owner Args - Desired owners for the group.
- group_
id string - The ID of the Okta group.
- owners list(object)
- Desired owners for the group.
- group
Id String - The ID of the Okta group.
- owners
List<Owners
Owner> - Desired owners for the group.
- group
Id string - The ID of the Okta group.
- owners
Owners
Owner[] - Desired owners for the group.
- group_
id str - The ID of the Okta group.
- owners
Sequence[Owners
Owner Args] - Desired owners for the group.
- group
Id String - The ID of the Okta group.
- owners List<Property Map>
- Desired owners for the group.
Outputs
All input properties are implicitly available as output properties. Additionally, the Owners resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Owners Resource
Get an existing Owners 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?: OwnersState, opts?: CustomResourceOptions): Owners@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
group_id: Optional[str] = None,
owners: Optional[Sequence[OwnersOwnerArgs]] = None) -> Ownersfunc GetOwners(ctx *Context, name string, id IDInput, state *OwnersState, opts ...ResourceOption) (*Owners, error)public static Owners Get(string name, Input<string> id, OwnersState? state, CustomResourceOptions? opts = null)public static Owners get(String name, Output<String> id, OwnersState state, CustomResourceOptions options)resources: _: type: okta:group:Owners get: id: ${id}import {
to = okta_group_owners.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.
- Group
Id string - The ID of the Okta group.
- Owner
List List<OwnersOwner> - Desired owners for the group.
- Group
Id string - The ID of the Okta group.
- Owners
[]Owners
Owner Args - Desired owners for the group.
- group_
id string - The ID of the Okta group.
- owners list(object)
- Desired owners for the group.
- group
Id String - The ID of the Okta group.
- owners
List<Owners
Owner> - Desired owners for the group.
- group
Id string - The ID of the Okta group.
- owners
Owners
Owner[] - Desired owners for the group.
- group_
id str - The ID of the Okta group.
- owners
Sequence[Owners
Owner Args] - Desired owners for the group.
- group
Id String - The ID of the Okta group.
- owners List<Property Map>
- Desired owners for the group.
Supporting Types
OwnersOwner, OwnersOwnerArgs
Import
$ pulumi import okta:group/owners:Owners example <group_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Okta pulumi/pulumi-okta
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oktaTerraform Provider.
published on Wednesday, Apr 29, 2026 by Pulumi
