Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement: automatically generate UUID for azurerm_role_assignment #667

Closed
jansepke opened this issue Jan 8, 2018 · 3 comments · Fixed by #685
Closed

Improvement: automatically generate UUID for azurerm_role_assignment #667

jansepke opened this issue Jan 8, 2018 · 3 comments · Fixed by #685

Comments

@jansepke
Copy link
Contributor

jansepke commented Jan 8, 2018

Terraform Version

Terraform v0.11.1

  • provider.azurerm v1.0.0

Affected Resource(s)

azurerm_role_assignment

Terraform Configuration Files

resource "azurerm_role_assignment" "test" {
  name               = "1a679e7d-719c-42bf-9141-15c8de83836d" // random UUID
  scope              = "..."
  role_definition_id = "..."
  principal_id       = "..."
}

Hi there,

I don't understand why I need to specify a unique UUID for a azurerm_role_assignment resource. This makes this piece of code less modular. Would it be possible to make this property optional and fall back to an automatically generated UUID? Or is there any way to generate a static UUID in terraform? When I use the ${uuid()} interpolation, terraform will recreate the azurerm_role_assignment each run because the interpolation has changed.

@tombuildsstuff
Copy link
Contributor

hey @jansepke

Thanks for opening this issue, I've added support for this in #685 which has been merged and will be released as part of v1.0.2 of the AzureRM Provider.

Thanks!

@JamesDLD
Copy link

JamesDLD commented Jun 8, 2018

Thanks for this improvement, just raised the same improvement here #1371 for the resource azurerm_role_definition

@ghost
Copy link

ghost commented Mar 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants