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_roles" "my_org_member_roles" {
organization_id = auth0_organization.my_org.id
user_id = auth0_user.user.id
roles = [auth0_role.reader.id, auth0_role.writer.id]
}
organization_id
(String) The ID of the organization.roles
(Set of String) The role ID(s) to assign to the organization member.user_id
(String) The user ID of the organization member.id
(String) The ID of this resource.Import is supported using the following syntax:
# This resource can be imported by specifying the
# organization ID and user ID separated by "::" (note the double colon)
# <organizationID>::<userID>
#
# Example:
terraform import auth0_organization_member_roles.my_org_member_roles "org_XXXXX::auth0|XXXXX"