Provides a Datadog UserRole resource. This can be used to create and manage Datadog User Roles. Conflicts may occur if used together with the datadog_user
resource's roles
attribute. This resource is in beta and is subject to change.
resource "datadog_role" "monitor_writer_role" {
name = "Monitor Writer Role"
permission {
id = data.datadog_permissions.bar.permissions.monitors_write
}
}
resource "datadog_user" "new_user" {
email = "new@example.com"
}
# Create new user_role resource
resource "datadog_user_role" "new_user_with_monitor_writer_role" {
role_id = datadog_role.monitor_writer_role.id
user_id = datadog_user.new_user.id
}
role_id
(String) ID of the role that the user is assigned to.user_id
(String) The ID of the user.id
(String) The ID of this resource.Import is supported using the following syntax:
# This resource is imported using user_id and role_id seperated by `:`.
terraform import datadog_user_role.user_with_admin_role "${role_id}:${user_id}"