This resource is used to manage the roles assigned to an organization member.
resource "auth0_role" "reader" {
name = "Reader"
}
resource "auth0_role" "writer" {
name = "Writer"
}
resource "auth0_user" "user" {
connection_name = "Username-Password-Authentication"
email = "test-user@auth0.com"
password = "MyPass123$"
}
resource "auth0_organization" "my_org" {
name = "some-org"
display_name = "Some Org"
}
resource "auth0_organization_member" "my_org_member" {
organization_id = auth0_organization.my_org.id
user_id = auth0_user.user.id
}
resource "auth0_organization_member_role" "role1" {
organization_id = auth0_organization.my_org.id
user_id = auth0_user.user.id
role_id = auth0_role.reader.id
}
resource "auth0_organization_member_role" "role2" {
organization_id = auth0_organization.my_org.id
user_id = auth0_user.user.id
role_id = auth0_role.writer.id
}
organization_id
(String) The ID of the organization.role_id
(String) The role ID to assign to the organization member.user_id
(String) The user ID of the organization member.id
(String) The ID of this resource.role_description
(String) Description of the role.role_name
(String) Name of the role.Import is supported using the following syntax:
# This resource can be imported by specifying the
# organization ID, user ID and role ID separated by "::" (note the double colon)
# <organizationID>::<userID>::<roleID>
#
# Example:
terraform import auth0_organization_member_role.my_org_member_role "org_XXXXX::auth0|XXXXX::role_XXXX"