published on Sunday, Oct 11, 2026 by Descope
published on Sunday, Oct 11, 2026 by Descope
Manages a single user custom attribute definition in a Descope project.
Create UserAttribute Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new UserAttribute(name: string, args: UserAttributeArgs, opts?: CustomResourceOptions);@overload
def UserAttribute(resource_name: str,
args: UserAttributeArgs,
opts: Optional[ResourceOptions] = None)
@overload
def UserAttribute(resource_name: str,
opts: Optional[ResourceOptions] = None,
project_id: Optional[str] = None,
type: Optional[str] = None,
user_attribute_id: Optional[str] = None,
name: Optional[str] = None,
select_options: Optional[Sequence[str]] = None,
widget_authorization: Optional[UserAttributeWidgetAuthorizationArgs] = None)func NewUserAttribute(ctx *Context, name string, args UserAttributeArgs, opts ...ResourceOption) (*UserAttribute, error)public UserAttribute(string name, UserAttributeArgs args, CustomResourceOptions? opts = null)
public UserAttribute(String name, UserAttributeArgs args)
public UserAttribute(String name, UserAttributeArgs args, CustomResourceOptions options)
type: descope:UserAttribute
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "descope_user_attribute" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args UserAttributeArgs
- 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 UserAttributeArgs
- 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 UserAttributeArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserAttributeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UserAttributeArgs
- 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 userAttributeResource = new Descope.UserAttribute("userAttributeResource", new()
{
ProjectId = "string",
Type = "string",
UserAttributeId = "string",
Name = "string",
SelectOptions = new[]
{
"string",
},
WidgetAuthorization = new Descope.Inputs.UserAttributeWidgetAuthorizationArgs
{
EditPermissions = new[]
{
"string",
},
ViewPermissions = new[]
{
"string",
},
},
});
example, err := descope.NewUserAttribute(ctx, "userAttributeResource", &descope.UserAttributeArgs{
ProjectId: pulumi.String("string"),
Type: pulumi.String("string"),
UserAttributeId: pulumi.String("string"),
Name: pulumi.String("string"),
SelectOptions: pulumi.StringArray{
pulumi.String("string"),
},
WidgetAuthorization: &descope.UserAttributeWidgetAuthorizationArgs{
EditPermissions: pulumi.StringArray{
pulumi.String("string"),
},
ViewPermissions: pulumi.StringArray{
pulumi.String("string"),
},
},
})
resource "descope_user_attribute" "userAttributeResource" {
lifecycle {
create_before_destroy = true
}
project_id = "string"
type = "string"
user_attribute_id = "string"
name = "string"
select_options = ["string"]
widget_authorization = {
edit_permissions = ["string"]
view_permissions = ["string"]
}
}
var userAttributeResource = new UserAttribute("userAttributeResource", UserAttributeArgs.builder()
.projectId("string")
.type("string")
.userAttributeId("string")
.name("string")
.selectOptions("string")
.widgetAuthorization(UserAttributeWidgetAuthorizationArgs.builder()
.editPermissions("string")
.viewPermissions("string")
.build())
.build());
user_attribute_resource = descope.UserAttribute("userAttributeResource",
project_id="string",
type="string",
user_attribute_id="string",
name="string",
select_options=["string"],
widget_authorization={
"edit_permissions": ["string"],
"view_permissions": ["string"],
})
const userAttributeResource = new descope.UserAttribute("userAttributeResource", {
projectId: "string",
type: "string",
userAttributeId: "string",
name: "string",
selectOptions: ["string"],
widgetAuthorization: {
editPermissions: ["string"],
viewPermissions: ["string"],
},
});
type: descope:UserAttribute
properties:
name: string
projectId: string
selectOptions:
- string
type: string
userAttributeId: string
widgetAuthorization:
editPermissions:
- string
viewPermissions:
- string
UserAttribute 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 UserAttribute resource accepts the following input properties:
- Project
Id string - The ID of the project that this user attribute belongs to. Changing this value will require the resource to be deleted and recreated.
- Type string
- The type of the attribute. Choose one of "string", "number", "boolean", "singleselect", "multiselect", "date", "monthday". Changing this value will require the resource to be deleted and recreated.
- User
Attribute stringId - The immutable machine name that identifies the attribute. This value is called
Machine Namein the Descope console. Changing this value will require the resource to be deleted and recreated. - Name string
- The display name of the attribute. This value is called
Display Namein the Descope console. - Select
Options List<string> - The list of options to choose from when the attribute type is "singleselect" or "multiselect".
-
Descope.
User Attribute Widget Authorization - Determines the permissions users are required to have to access this attribute in the user management widget.
- Project
Id string - The ID of the project that this user attribute belongs to. Changing this value will require the resource to be deleted and recreated.
- Type string
- The type of the attribute. Choose one of "string", "number", "boolean", "singleselect", "multiselect", "date", "monthday". Changing this value will require the resource to be deleted and recreated.
- User
Attribute stringId - The immutable machine name that identifies the attribute. This value is called
Machine Namein the Descope console. Changing this value will require the resource to be deleted and recreated. - Name string
- The display name of the attribute. This value is called
Display Namein the Descope console. - Select
Options []string - The list of options to choose from when the attribute type is "singleselect" or "multiselect".
-
User
Attribute Widget Authorization Args - Determines the permissions users are required to have to access this attribute in the user management widget.
- project_
id string - The ID of the project that this user attribute belongs to. Changing this value will require the resource to be deleted and recreated.
- type string
- The type of the attribute. Choose one of "string", "number", "boolean", "singleselect", "multiselect", "date", "monthday". Changing this value will require the resource to be deleted and recreated.
- user_
attribute_ stringid - The immutable machine name that identifies the attribute. This value is called
Machine Namein the Descope console. Changing this value will require the resource to be deleted and recreated. - name string
- The display name of the attribute. This value is called
Display Namein the Descope console. - select_
options list(string) - The list of options to choose from when the attribute type is "singleselect" or "multiselect".
- object
- Determines the permissions users are required to have to access this attribute in the user management widget.
- project
Id String - The ID of the project that this user attribute belongs to. Changing this value will require the resource to be deleted and recreated.
- type String
- The type of the attribute. Choose one of "string", "number", "boolean", "singleselect", "multiselect", "date", "monthday". Changing this value will require the resource to be deleted and recreated.
- user
Attribute StringId - The immutable machine name that identifies the attribute. This value is called
Machine Namein the Descope console. Changing this value will require the resource to be deleted and recreated. - name String
- The display name of the attribute. This value is called
Display Namein the Descope console. - select
Options List<String> - The list of options to choose from when the attribute type is "singleselect" or "multiselect".
-
User
Attribute Widget Authorization - Determines the permissions users are required to have to access this attribute in the user management widget.
- project
Id string - The ID of the project that this user attribute belongs to. Changing this value will require the resource to be deleted and recreated.
- type string
- The type of the attribute. Choose one of "string", "number", "boolean", "singleselect", "multiselect", "date", "monthday". Changing this value will require the resource to be deleted and recreated.
- user
Attribute stringId - The immutable machine name that identifies the attribute. This value is called
Machine Namein the Descope console. Changing this value will require the resource to be deleted and recreated. - name string
- The display name of the attribute. This value is called
Display Namein the Descope console. - select
Options string[] - The list of options to choose from when the attribute type is "singleselect" or "multiselect".
-
User
Attribute Widget Authorization - Determines the permissions users are required to have to access this attribute in the user management widget.
- project_
id str - The ID of the project that this user attribute belongs to. Changing this value will require the resource to be deleted and recreated.
- type str
- The type of the attribute. Choose one of "string", "number", "boolean", "singleselect", "multiselect", "date", "monthday". Changing this value will require the resource to be deleted and recreated.
- user_
attribute_ strid - The immutable machine name that identifies the attribute. This value is called
Machine Namein the Descope console. Changing this value will require the resource to be deleted and recreated. - name str
- The display name of the attribute. This value is called
Display Namein the Descope console. - select_
options Sequence[str] - The list of options to choose from when the attribute type is "singleselect" or "multiselect".
-
User
Attribute Widget Authorization Args - Determines the permissions users are required to have to access this attribute in the user management widget.
- project
Id String - The ID of the project that this user attribute belongs to. Changing this value will require the resource to be deleted and recreated.
- type String
- The type of the attribute. Choose one of "string", "number", "boolean", "singleselect", "multiselect", "date", "monthday". Changing this value will require the resource to be deleted and recreated.
- user
Attribute StringId - The immutable machine name that identifies the attribute. This value is called
Machine Namein the Descope console. Changing this value will require the resource to be deleted and recreated. - name String
- The display name of the attribute. This value is called
Display Namein the Descope console. - select
Options List<String> - The list of options to choose from when the attribute type is "singleselect" or "multiselect".
- Property Map
- Determines the permissions users are required to have to access this attribute in the user management widget.
Outputs
All input properties are implicitly available as output properties. Additionally, the UserAttribute 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 UserAttribute Resource
Get an existing UserAttribute 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?: UserAttributeState, opts?: CustomResourceOptions): UserAttribute@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
project_id: Optional[str] = None,
select_options: Optional[Sequence[str]] = None,
type: Optional[str] = None,
user_attribute_id: Optional[str] = None,
widget_authorization: Optional[UserAttributeWidgetAuthorizationArgs] = None) -> UserAttributefunc GetUserAttribute(ctx *Context, name string, id IDInput, state *UserAttributeState, opts ...ResourceOption) (*UserAttribute, error)public static UserAttribute Get(string name, Input<string> id, UserAttributeState? state, CustomResourceOptions? opts = null)public static UserAttribute get(String name, Output<String> id, UserAttributeState state, CustomResourceOptions options)resources: existingUserAttribute: type: descope:UserAttribute get: id: ${id}import {
to = descope_user_attribute.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 UserAttributeState
- 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 UserAttributeState
- 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 UserAttributeState
- 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 UserAttributeState
- 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.
- Name string
- The display name of the attribute. This value is called
Display Namein the Descope console. - Project
Id string - The ID of the project that this user attribute belongs to. Changing this value will require the resource to be deleted and recreated.
- Select
Options List<string> - The list of options to choose from when the attribute type is "singleselect" or "multiselect".
- Type string
- The type of the attribute. Choose one of "string", "number", "boolean", "singleselect", "multiselect", "date", "monthday". Changing this value will require the resource to be deleted and recreated.
- User
Attribute stringId - The immutable machine name that identifies the attribute. This value is called
Machine Namein the Descope console. Changing this value will require the resource to be deleted and recreated. -
Descope.
User Attribute Widget Authorization - Determines the permissions users are required to have to access this attribute in the user management widget.
- Name string
- The display name of the attribute. This value is called
Display Namein the Descope console. - Project
Id string - The ID of the project that this user attribute belongs to. Changing this value will require the resource to be deleted and recreated.
- Select
Options []string - The list of options to choose from when the attribute type is "singleselect" or "multiselect".
- Type string
- The type of the attribute. Choose one of "string", "number", "boolean", "singleselect", "multiselect", "date", "monthday". Changing this value will require the resource to be deleted and recreated.
- User
Attribute stringId - The immutable machine name that identifies the attribute. This value is called
Machine Namein the Descope console. Changing this value will require the resource to be deleted and recreated. -
User
Attribute Widget Authorization Args - Determines the permissions users are required to have to access this attribute in the user management widget.
- name string
- The display name of the attribute. This value is called
Display Namein the Descope console. - project_
id string - The ID of the project that this user attribute belongs to. Changing this value will require the resource to be deleted and recreated.
- select_
options list(string) - The list of options to choose from when the attribute type is "singleselect" or "multiselect".
- type string
- The type of the attribute. Choose one of "string", "number", "boolean", "singleselect", "multiselect", "date", "monthday". Changing this value will require the resource to be deleted and recreated.
- user_
attribute_ stringid - The immutable machine name that identifies the attribute. This value is called
Machine Namein the Descope console. Changing this value will require the resource to be deleted and recreated. - object
- Determines the permissions users are required to have to access this attribute in the user management widget.
- name String
- The display name of the attribute. This value is called
Display Namein the Descope console. - project
Id String - The ID of the project that this user attribute belongs to. Changing this value will require the resource to be deleted and recreated.
- select
Options List<String> - The list of options to choose from when the attribute type is "singleselect" or "multiselect".
- type String
- The type of the attribute. Choose one of "string", "number", "boolean", "singleselect", "multiselect", "date", "monthday". Changing this value will require the resource to be deleted and recreated.
- user
Attribute StringId - The immutable machine name that identifies the attribute. This value is called
Machine Namein the Descope console. Changing this value will require the resource to be deleted and recreated. -
User
Attribute Widget Authorization - Determines the permissions users are required to have to access this attribute in the user management widget.
- name string
- The display name of the attribute. This value is called
Display Namein the Descope console. - project
Id string - The ID of the project that this user attribute belongs to. Changing this value will require the resource to be deleted and recreated.
- select
Options string[] - The list of options to choose from when the attribute type is "singleselect" or "multiselect".
- type string
- The type of the attribute. Choose one of "string", "number", "boolean", "singleselect", "multiselect", "date", "monthday". Changing this value will require the resource to be deleted and recreated.
- user
Attribute stringId - The immutable machine name that identifies the attribute. This value is called
Machine Namein the Descope console. Changing this value will require the resource to be deleted and recreated. -
User
Attribute Widget Authorization - Determines the permissions users are required to have to access this attribute in the user management widget.
- name str
- The display name of the attribute. This value is called
Display Namein the Descope console. - project_
id str - The ID of the project that this user attribute belongs to. Changing this value will require the resource to be deleted and recreated.
- select_
options Sequence[str] - The list of options to choose from when the attribute type is "singleselect" or "multiselect".
- type str
- The type of the attribute. Choose one of "string", "number", "boolean", "singleselect", "multiselect", "date", "monthday". Changing this value will require the resource to be deleted and recreated.
- user_
attribute_ strid - The immutable machine name that identifies the attribute. This value is called
Machine Namein the Descope console. Changing this value will require the resource to be deleted and recreated. -
User
Attribute Widget Authorization Args - Determines the permissions users are required to have to access this attribute in the user management widget.
- name String
- The display name of the attribute. This value is called
Display Namein the Descope console. - project
Id String - The ID of the project that this user attribute belongs to. Changing this value will require the resource to be deleted and recreated.
- select
Options List<String> - The list of options to choose from when the attribute type is "singleselect" or "multiselect".
- type String
- The type of the attribute. Choose one of "string", "number", "boolean", "singleselect", "multiselect", "date", "monthday". Changing this value will require the resource to be deleted and recreated.
- user
Attribute StringId - The immutable machine name that identifies the attribute. This value is called
Machine Namein the Descope console. Changing this value will require the resource to be deleted and recreated. - Property Map
- Determines the permissions users are required to have to access this attribute in the user management widget.
Supporting Types
UserAttributeWidgetAuthorization, UserAttributeWidgetAuthorizationArgs
- Edit
Permissions List<string> - The names of the permissions users are required to have to edit this attribute in the user management widget. An empty set means no restriction.
- View
Permissions List<string> - The names of the permissions users are required to have to view this attribute in the user management widget. An empty set means no restriction.
- Edit
Permissions []string - The names of the permissions users are required to have to edit this attribute in the user management widget. An empty set means no restriction.
- View
Permissions []string - The names of the permissions users are required to have to view this attribute in the user management widget. An empty set means no restriction.
- edit_
permissions list(string) - The names of the permissions users are required to have to edit this attribute in the user management widget. An empty set means no restriction.
- view_
permissions list(string) - The names of the permissions users are required to have to view this attribute in the user management widget. An empty set means no restriction.
- edit
Permissions List<String> - The names of the permissions users are required to have to edit this attribute in the user management widget. An empty set means no restriction.
- view
Permissions List<String> - The names of the permissions users are required to have to view this attribute in the user management widget. An empty set means no restriction.
- edit
Permissions string[] - The names of the permissions users are required to have to edit this attribute in the user management widget. An empty set means no restriction.
- view
Permissions string[] - The names of the permissions users are required to have to view this attribute in the user management widget. An empty set means no restriction.
- edit_
permissions Sequence[str] - The names of the permissions users are required to have to edit this attribute in the user management widget. An empty set means no restriction.
- view_
permissions Sequence[str] - The names of the permissions users are required to have to view this attribute in the user management widget. An empty set means no restriction.
- edit
Permissions List<String> - The names of the permissions users are required to have to edit this attribute in the user management widget. An empty set means no restriction.
- view
Permissions List<String> - The names of the permissions users are required to have to view this attribute in the user management widget. An empty set means no restriction.
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