published on Sunday, Oct 11, 2026 by Descope
published on Sunday, Oct 11, 2026 by Descope
Manages a single role scoped to a federated application. Roles reference application permissions by id via permissionIds, and project-level roles by id via roleMappings.
Create AppRole Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AppRole(name: string, args: AppRoleArgs, opts?: CustomResourceOptions);@overload
def AppRole(resource_name: str,
args: AppRoleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AppRole(resource_name: str,
opts: Optional[ResourceOptions] = None,
app_id: Optional[str] = None,
project_id: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
permission_ids: Optional[Sequence[str]] = None,
role_mappings: Optional[Sequence[str]] = None)func NewAppRole(ctx *Context, name string, args AppRoleArgs, opts ...ResourceOption) (*AppRole, error)public AppRole(string name, AppRoleArgs args, CustomResourceOptions? opts = null)
public AppRole(String name, AppRoleArgs args)
public AppRole(String name, AppRoleArgs args, CustomResourceOptions options)
type: descope:AppRole
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "descope_app_role" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args AppRoleArgs
- 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 AppRoleArgs
- 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 AppRoleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AppRoleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AppRoleArgs
- 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 appRoleResource = new Descope.AppRole("appRoleResource", new()
{
AppId = "string",
ProjectId = "string",
Description = "string",
Name = "string",
PermissionIds = new[]
{
"string",
},
RoleMappings = new[]
{
"string",
},
});
example, err := descope.NewAppRole(ctx, "appRoleResource", &descope.AppRoleArgs{
AppId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
PermissionIds: pulumi.StringArray{
pulumi.String("string"),
},
RoleMappings: pulumi.StringArray{
pulumi.String("string"),
},
})
resource "descope_app_role" "appRoleResource" {
lifecycle {
create_before_destroy = true
}
app_id = "string"
project_id = "string"
description = "string"
name = "string"
permission_ids = ["string"]
role_mappings = ["string"]
}
var appRoleResource = new AppRole("appRoleResource", AppRoleArgs.builder()
.appId("string")
.projectId("string")
.description("string")
.name("string")
.permissionIds("string")
.roleMappings("string")
.build());
app_role_resource = descope.AppRole("appRoleResource",
app_id="string",
project_id="string",
description="string",
name="string",
permission_ids=["string"],
role_mappings=["string"])
const appRoleResource = new descope.AppRole("appRoleResource", {
appId: "string",
projectId: "string",
description: "string",
name: "string",
permissionIds: ["string"],
roleMappings: ["string"],
});
type: descope:AppRole
properties:
appId: string
description: string
name: string
permissionIds:
- string
projectId: string
roleMappings:
- string
AppRole 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 AppRole resource accepts the following input properties:
- App
Id string - The ID of the federated application that this role is scoped to. Reference the
idattribute of the application resource (e.g.,descope_oidc_app.example.id). Changing this value will require the resource to be deleted and recreated. - Project
Id string - The ID of the project that this role belongs to. Changing this value will require the resource to be deleted and recreated.
- Description string
- An optional description for the role.
- Name string
- The name of the role. Role names must be unique per application, and a role is renamed in place, so user assignments and service account references to it are preserved.
- Permission
Ids List<string> - The IDs of the application permissions this role grants. Reference the
idattribute ofdescope.AppPermissionresources on the same application (e.g.,descope_app_permission.example.id) so that Terraform orders the operations correctly. - Role
Mappings List<string> - The IDs of project-level roles that map users to this application role at login. Reference the
idattribute ofdescope.Roleresources (e.g.,descope_role.example.id).
- App
Id string - The ID of the federated application that this role is scoped to. Reference the
idattribute of the application resource (e.g.,descope_oidc_app.example.id). Changing this value will require the resource to be deleted and recreated. - Project
Id string - The ID of the project that this role belongs to. Changing this value will require the resource to be deleted and recreated.
- Description string
- An optional description for the role.
- Name string
- The name of the role. Role names must be unique per application, and a role is renamed in place, so user assignments and service account references to it are preserved.
- Permission
Ids []string - The IDs of the application permissions this role grants. Reference the
idattribute ofdescope.AppPermissionresources on the same application (e.g.,descope_app_permission.example.id) so that Terraform orders the operations correctly. - Role
Mappings []string - The IDs of project-level roles that map users to this application role at login. Reference the
idattribute ofdescope.Roleresources (e.g.,descope_role.example.id).
- app_
id string - The ID of the federated application that this role is scoped to. Reference the
idattribute of the application resource (e.g.,descope_oidc_app.example.id). Changing this value will require the resource to be deleted and recreated. - project_
id string - The ID of the project that this role belongs to. Changing this value will require the resource to be deleted and recreated.
- description string
- An optional description for the role.
- name string
- The name of the role. Role names must be unique per application, and a role is renamed in place, so user assignments and service account references to it are preserved.
- permission_
ids list(string) - The IDs of the application permissions this role grants. Reference the
idattribute ofdescope.AppPermissionresources on the same application (e.g.,descope_app_permission.example.id) so that Terraform orders the operations correctly. - role_
mappings list(string) - The IDs of project-level roles that map users to this application role at login. Reference the
idattribute ofdescope.Roleresources (e.g.,descope_role.example.id).
- app
Id String - The ID of the federated application that this role is scoped to. Reference the
idattribute of the application resource (e.g.,descope_oidc_app.example.id). Changing this value will require the resource to be deleted and recreated. - project
Id String - The ID of the project that this role belongs to. Changing this value will require the resource to be deleted and recreated.
- description String
- An optional description for the role.
- name String
- The name of the role. Role names must be unique per application, and a role is renamed in place, so user assignments and service account references to it are preserved.
- permission
Ids List<String> - The IDs of the application permissions this role grants. Reference the
idattribute ofdescope.AppPermissionresources on the same application (e.g.,descope_app_permission.example.id) so that Terraform orders the operations correctly. - role
Mappings List<String> - The IDs of project-level roles that map users to this application role at login. Reference the
idattribute ofdescope.Roleresources (e.g.,descope_role.example.id).
- app
Id string - The ID of the federated application that this role is scoped to. Reference the
idattribute of the application resource (e.g.,descope_oidc_app.example.id). Changing this value will require the resource to be deleted and recreated. - project
Id string - The ID of the project that this role belongs to. Changing this value will require the resource to be deleted and recreated.
- description string
- An optional description for the role.
- name string
- The name of the role. Role names must be unique per application, and a role is renamed in place, so user assignments and service account references to it are preserved.
- permission
Ids string[] - The IDs of the application permissions this role grants. Reference the
idattribute ofdescope.AppPermissionresources on the same application (e.g.,descope_app_permission.example.id) so that Terraform orders the operations correctly. - role
Mappings string[] - The IDs of project-level roles that map users to this application role at login. Reference the
idattribute ofdescope.Roleresources (e.g.,descope_role.example.id).
- app_
id str - The ID of the federated application that this role is scoped to. Reference the
idattribute of the application resource (e.g.,descope_oidc_app.example.id). Changing this value will require the resource to be deleted and recreated. - project_
id str - The ID of the project that this role belongs to. Changing this value will require the resource to be deleted and recreated.
- description str
- An optional description for the role.
- name str
- The name of the role. Role names must be unique per application, and a role is renamed in place, so user assignments and service account references to it are preserved.
- permission_
ids Sequence[str] - The IDs of the application permissions this role grants. Reference the
idattribute ofdescope.AppPermissionresources on the same application (e.g.,descope_app_permission.example.id) so that Terraform orders the operations correctly. - role_
mappings Sequence[str] - The IDs of project-level roles that map users to this application role at login. Reference the
idattribute ofdescope.Roleresources (e.g.,descope_role.example.id).
- app
Id String - The ID of the federated application that this role is scoped to. Reference the
idattribute of the application resource (e.g.,descope_oidc_app.example.id). Changing this value will require the resource to be deleted and recreated. - project
Id String - The ID of the project that this role belongs to. Changing this value will require the resource to be deleted and recreated.
- description String
- An optional description for the role.
- name String
- The name of the role. Role names must be unique per application, and a role is renamed in place, so user assignments and service account references to it are preserved.
- permission
Ids List<String> - The IDs of the application permissions this role grants. Reference the
idattribute ofdescope.AppPermissionresources on the same application (e.g.,descope_app_permission.example.id) so that Terraform orders the operations correctly. - role
Mappings List<String> - The IDs of project-level roles that map users to this application role at login. Reference the
idattribute ofdescope.Roleresources (e.g.,descope_role.example.id).
Outputs
All input properties are implicitly available as output properties. Additionally, the AppRole 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 AppRole Resource
Get an existing AppRole 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?: AppRoleState, opts?: CustomResourceOptions): AppRole@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
app_id: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
permission_ids: Optional[Sequence[str]] = None,
project_id: Optional[str] = None,
role_mappings: Optional[Sequence[str]] = None) -> AppRolefunc GetAppRole(ctx *Context, name string, id IDInput, state *AppRoleState, opts ...ResourceOption) (*AppRole, error)public static AppRole Get(string name, Input<string> id, AppRoleState? state, CustomResourceOptions? opts = null)public static AppRole get(String name, Output<String> id, AppRoleState state, CustomResourceOptions options)resources: existingAppRole: type: descope:AppRole get: id: ${id}import {
to = descope_app_role.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 AppRoleState
- 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 AppRoleState
- 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 AppRoleState
- 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 AppRoleState
- 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.
- App
Id string - The ID of the federated application that this role is scoped to. Reference the
idattribute of the application resource (e.g.,descope_oidc_app.example.id). Changing this value will require the resource to be deleted and recreated. - Description string
- An optional description for the role.
- Name string
- The name of the role. Role names must be unique per application, and a role is renamed in place, so user assignments and service account references to it are preserved.
- Permission
Ids List<string> - The IDs of the application permissions this role grants. Reference the
idattribute ofdescope.AppPermissionresources on the same application (e.g.,descope_app_permission.example.id) so that Terraform orders the operations correctly. - Project
Id string - The ID of the project that this role belongs to. Changing this value will require the resource to be deleted and recreated.
- Role
Mappings List<string> - The IDs of project-level roles that map users to this application role at login. Reference the
idattribute ofdescope.Roleresources (e.g.,descope_role.example.id).
- App
Id string - The ID of the federated application that this role is scoped to. Reference the
idattribute of the application resource (e.g.,descope_oidc_app.example.id). Changing this value will require the resource to be deleted and recreated. - Description string
- An optional description for the role.
- Name string
- The name of the role. Role names must be unique per application, and a role is renamed in place, so user assignments and service account references to it are preserved.
- Permission
Ids []string - The IDs of the application permissions this role grants. Reference the
idattribute ofdescope.AppPermissionresources on the same application (e.g.,descope_app_permission.example.id) so that Terraform orders the operations correctly. - Project
Id string - The ID of the project that this role belongs to. Changing this value will require the resource to be deleted and recreated.
- Role
Mappings []string - The IDs of project-level roles that map users to this application role at login. Reference the
idattribute ofdescope.Roleresources (e.g.,descope_role.example.id).
- app_
id string - The ID of the federated application that this role is scoped to. Reference the
idattribute of the application resource (e.g.,descope_oidc_app.example.id). Changing this value will require the resource to be deleted and recreated. - description string
- An optional description for the role.
- name string
- The name of the role. Role names must be unique per application, and a role is renamed in place, so user assignments and service account references to it are preserved.
- permission_
ids list(string) - The IDs of the application permissions this role grants. Reference the
idattribute ofdescope.AppPermissionresources on the same application (e.g.,descope_app_permission.example.id) so that Terraform orders the operations correctly. - project_
id string - The ID of the project that this role belongs to. Changing this value will require the resource to be deleted and recreated.
- role_
mappings list(string) - The IDs of project-level roles that map users to this application role at login. Reference the
idattribute ofdescope.Roleresources (e.g.,descope_role.example.id).
- app
Id String - The ID of the federated application that this role is scoped to. Reference the
idattribute of the application resource (e.g.,descope_oidc_app.example.id). Changing this value will require the resource to be deleted and recreated. - description String
- An optional description for the role.
- name String
- The name of the role. Role names must be unique per application, and a role is renamed in place, so user assignments and service account references to it are preserved.
- permission
Ids List<String> - The IDs of the application permissions this role grants. Reference the
idattribute ofdescope.AppPermissionresources on the same application (e.g.,descope_app_permission.example.id) so that Terraform orders the operations correctly. - project
Id String - The ID of the project that this role belongs to. Changing this value will require the resource to be deleted and recreated.
- role
Mappings List<String> - The IDs of project-level roles that map users to this application role at login. Reference the
idattribute ofdescope.Roleresources (e.g.,descope_role.example.id).
- app
Id string - The ID of the federated application that this role is scoped to. Reference the
idattribute of the application resource (e.g.,descope_oidc_app.example.id). Changing this value will require the resource to be deleted and recreated. - description string
- An optional description for the role.
- name string
- The name of the role. Role names must be unique per application, and a role is renamed in place, so user assignments and service account references to it are preserved.
- permission
Ids string[] - The IDs of the application permissions this role grants. Reference the
idattribute ofdescope.AppPermissionresources on the same application (e.g.,descope_app_permission.example.id) so that Terraform orders the operations correctly. - project
Id string - The ID of the project that this role belongs to. Changing this value will require the resource to be deleted and recreated.
- role
Mappings string[] - The IDs of project-level roles that map users to this application role at login. Reference the
idattribute ofdescope.Roleresources (e.g.,descope_role.example.id).
- app_
id str - The ID of the federated application that this role is scoped to. Reference the
idattribute of the application resource (e.g.,descope_oidc_app.example.id). Changing this value will require the resource to be deleted and recreated. - description str
- An optional description for the role.
- name str
- The name of the role. Role names must be unique per application, and a role is renamed in place, so user assignments and service account references to it are preserved.
- permission_
ids Sequence[str] - The IDs of the application permissions this role grants. Reference the
idattribute ofdescope.AppPermissionresources on the same application (e.g.,descope_app_permission.example.id) so that Terraform orders the operations correctly. - project_
id str - The ID of the project that this role belongs to. Changing this value will require the resource to be deleted and recreated.
- role_
mappings Sequence[str] - The IDs of project-level roles that map users to this application role at login. Reference the
idattribute ofdescope.Roleresources (e.g.,descope_role.example.id).
- app
Id String - The ID of the federated application that this role is scoped to. Reference the
idattribute of the application resource (e.g.,descope_oidc_app.example.id). Changing this value will require the resource to be deleted and recreated. - description String
- An optional description for the role.
- name String
- The name of the role. Role names must be unique per application, and a role is renamed in place, so user assignments and service account references to it are preserved.
- permission
Ids List<String> - The IDs of the application permissions this role grants. Reference the
idattribute ofdescope.AppPermissionresources on the same application (e.g.,descope_app_permission.example.id) so that Terraform orders the operations correctly. - project
Id String - The ID of the project that this role belongs to. Changing this value will require the resource to be deleted and recreated.
- role
Mappings List<String> - The IDs of project-level roles that map users to this application role at login. Reference the
idattribute ofdescope.Roleresources (e.g.,descope_role.example.id).
Package Details
- Repository
- descope descope/pulumi-descope
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
descopeTerraform Provider.
published on Sunday, Oct 11, 2026 by Descope