terraform-provider-datadog
terraform-provider-datadog copied to clipboard
Feature request: datadog role user attachment resource
Currently, when you define a datadog_user
, you have to supply all the roles that the user gets upfront. This complicates some of our code significantly. On the other hand, for things like AWS policy attachments, you can attach a policy to a role, user, group, etc. independently of the creation of that role/user/group. Is something similar possible for Datadog roles?
example AWS code:
resource "aws_iam_role" "role" {
# ...
}
resource "aws_iam_policy" "policy" {
# ...
}
resource "aws_iam_role_policy_attachment" "attachment" {
role = aws_iam_role.role.name
policy_arn = aws_iam_policy.policy.arn
}
Note that the attachment could be in a whole other Terraform directory; it adds quite a bit of flexibility.