AdminRoleTargets

Manages targets for administrator roles.

This resource allows you to define permissions for admin roles into a smaller subset of Groups or Apps within your org. You can define admin roles to target Groups, Applications, and Application Instances.

Example Usage

using Pulumi;
using Okta = Pulumi.Okta;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Okta.AdminRoleTargets("example", new Okta.AdminRoleTargetsArgs
        {
            Apps = 
            {
                "oidc_client.<app_id>",
                "facebook",
            },
            RoleType = "APP_ADMIN",
            UserId = "<user_id>",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-okta/sdk/v3/go/okta"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := okta.NewAdminRoleTargets(ctx, "example", &okta.AdminRoleTargetsArgs{
			Apps: pulumi.StringArray{
				pulumi.String("oidc_client.<app_id>"),
				pulumi.String("facebook"),
			},
			RoleType: pulumi.String("APP_ADMIN"),
			UserId:   pulumi.String("<user_id>"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_okta as okta

example = okta.AdminRoleTargets("example",
    apps=[
        "oidc_client.<app_id>",
        "facebook",
    ],
    role_type="APP_ADMIN",
    user_id="<user_id>")
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";

const example = new okta.AdminRoleTargets("example", {
    apps: [
        "oidc_client.<app_id>",
        "facebook",
    ],
    roleType: "APP_ADMIN",
    userId: "<user_id>",
});

Create a AdminRoleTargets Resource

new AdminRoleTargets(name: string, args: AdminRoleTargetsArgs, opts?: CustomResourceOptions);
@overload
def AdminRoleTargets(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     apps: Optional[Sequence[str]] = None,
                     groups: Optional[Sequence[str]] = None,
                     role_type: Optional[str] = None,
                     user_id: Optional[str] = None)
@overload
def AdminRoleTargets(resource_name: str,
                     args: AdminRoleTargetsArgs,
                     opts: Optional[ResourceOptions] = None)
func NewAdminRoleTargets(ctx *Context, name string, args AdminRoleTargetsArgs, opts ...ResourceOption) (*AdminRoleTargets, error)
public AdminRoleTargets(string name, AdminRoleTargetsArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AdminRoleTargetsArgs
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 AdminRoleTargetsArgs
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 AdminRoleTargetsArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AdminRoleTargetsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AdminRoleTargets Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The AdminRoleTargets resource accepts the following input properties:

RoleType string
Name of the role associated with the user.
UserId string
ID of the user.
Apps List<string>
List of app names (name represents set of app instances) or a combination of app name and app instance ID (like ‘salesforce’ or ‘facebook.0oapsqQ6dv19pqyEo0g3’).
Groups List<string>
List of group IDs. Conflicts with apps.
RoleType string
Name of the role associated with the user.
UserId string
ID of the user.
Apps []string
List of app names (name represents set of app instances) or a combination of app name and app instance ID (like ‘salesforce’ or ‘facebook.0oapsqQ6dv19pqyEo0g3’).
Groups []string
List of group IDs. Conflicts with apps.
roleType string
Name of the role associated with the user.
userId string
ID of the user.
apps string[]
List of app names (name represents set of app instances) or a combination of app name and app instance ID (like ‘salesforce’ or ‘facebook.0oapsqQ6dv19pqyEo0g3’).
groups string[]
List of group IDs. Conflicts with apps.
role_type str
Name of the role associated with the user.
user_id str
ID of the user.
apps Sequence[str]
List of app names (name represents set of app instances) or a combination of app name and app instance ID (like ‘salesforce’ or ‘facebook.0oapsqQ6dv19pqyEo0g3’).
groups Sequence[str]
List of group IDs. Conflicts with apps.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
RoleId string
Role ID.
Id string
The provider-assigned unique ID for this managed resource.
RoleId string
Role ID.
id string
The provider-assigned unique ID for this managed resource.
roleId string
Role ID.
id str
The provider-assigned unique ID for this managed resource.
role_id str
Role ID.

Look up an Existing AdminRoleTargets Resource

Get an existing AdminRoleTargets 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?: AdminRoleTargetsState, opts?: CustomResourceOptions): AdminRoleTargets
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        apps: Optional[Sequence[str]] = None,
        groups: Optional[Sequence[str]] = None,
        role_id: Optional[str] = None,
        role_type: Optional[str] = None,
        user_id: Optional[str] = None) -> AdminRoleTargets
func GetAdminRoleTargets(ctx *Context, name string, id IDInput, state *AdminRoleTargetsState, opts ...ResourceOption) (*AdminRoleTargets, error)
public static AdminRoleTargets Get(string name, Input<string> id, AdminRoleTargetsState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Apps List<string>
List of app names (name represents set of app instances) or a combination of app name and app instance ID (like ‘salesforce’ or ‘facebook.0oapsqQ6dv19pqyEo0g3’).
Groups List<string>
List of group IDs. Conflicts with apps.
RoleId string
Role ID.
RoleType string
Name of the role associated with the user.
UserId string
ID of the user.
Apps []string
List of app names (name represents set of app instances) or a combination of app name and app instance ID (like ‘salesforce’ or ‘facebook.0oapsqQ6dv19pqyEo0g3’).
Groups []string
List of group IDs. Conflicts with apps.
RoleId string
Role ID.
RoleType string
Name of the role associated with the user.
UserId string
ID of the user.
apps string[]
List of app names (name represents set of app instances) or a combination of app name and app instance ID (like ‘salesforce’ or ‘facebook.0oapsqQ6dv19pqyEo0g3’).
groups string[]
List of group IDs. Conflicts with apps.
roleId string
Role ID.
roleType string
Name of the role associated with the user.
userId string
ID of the user.
apps Sequence[str]
List of app names (name represents set of app instances) or a combination of app name and app instance ID (like ‘salesforce’ or ‘facebook.0oapsqQ6dv19pqyEo0g3’).
groups Sequence[str]
List of group IDs. Conflicts with apps.
role_id str
Role ID.
role_type str
Name of the role associated with the user.
user_id str
ID of the user.

Import

Okta Admin Role Targets can be imported via the Okta ID.

 $ pulumi import okta:index/adminRoleTargets:AdminRoleTargets example <user id>/<role type>

Package Details

Repository
https://github.com/pulumi/pulumi-okta
License
Apache-2.0
Notes
This Pulumi package is based on the okta Terraform Provider.