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

azurerm_windows_virtual_machine identity_ids are case-sensitive, and shouldn't be #10099

Closed
arestarh opened this issue Jan 8, 2021 · 5 comments

Comments

@arestarh
Copy link
Contributor

arestarh commented Jan 8, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Terraform v0.14.3
AzureRM Provider v2.41.0

Affected Resource(s)

  • azurerm_windows_virtual_machine

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp

Debug Output

Observe the difference in case of "resourcegroups" vs. "resourceGroups" below in the identity_ids.

~ resource "azurerm_windows_virtual_machine" "my_vm" {
2021-01-06T14:16:23.5207447Z         id                         = "/subscriptions/***/resourceGroups/my-rg/providers/Microsoft.Compute/virtualMachines/my-vm"
2021-01-06T14:16:23.5208123Z         name                       = "my-vm"
2021-01-06T14:16:23.5208490Z         tags                       = {
2021-01-06T14:16:23.5209272Z             "barometer_id"   = "tag1"
2021-01-06T14:16:23.5209688Z             "owner"          = "tag2"
2021-01-06T14:16:23.5214872Z             "project"        = "tag3"
2021-01-06T14:16:23.5215270Z             "wk_class_Patch" = "tag4"
2021-01-06T14:16:23.5215905Z         }
2021-01-06T14:16:23.5216152Z         # (21 unchanged attributes hidden)
2021-01-06T14:16:23.5216326Z 
2021-01-06T14:16:23.5216448Z 
2021-01-06T14:16:23.5216615Z       ~ identity {
2021-01-06T14:16:23.5216844Z           ~ identity_ids = [
2021-01-06T14:16:23.5217398Z               + "/subscriptions/***/resourceGroups/my-rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-uami",
2021-01-06T14:16:23.5218665Z               - "/subscriptions/***/resourcegroups/my-rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-uami",
2021-01-06T14:16:23.5219513Z                 # (1 unchanged element hidden)
2021-01-06T14:16:23.5219762Z             ]
2021-01-06T14:16:23.5222347Z             # (1 unchanged attribute hidden)
2021-01-06T14:16:23.5223373Z         }
2021-01-06T14:16:23.5224046Z 
2021-01-06T14:16:23.5224273Z         # (2 unchanged blocks hidden)
2021-01-06T14:16:23.5224494Z     }

Panic Output

Expected Behaviour

The property is identical other than case, so resource does not need to be updated and should not be identified by terraform plan for an update.

Actual Behaviour

Terraform wants to update the resource

Steps to Reproduce

  1. terraform apply

Important Factoids

This occurs every run, even after applying. I run terraform apply again, and EVERY TIME it thinks it needs to update the resource.

References

  • #0000
@arestarh
Copy link
Contributor Author

arestarh commented Jan 8, 2021

It's pretty the same issue described in #10029

sharebear added a commit to sharebear/terraform-provider-azurerm that referenced this issue Jan 8, 2021
@jbinko
Copy link
Contributor

jbinko commented Feb 15, 2021

@katbyte : I guess can be closed now

@tombuildsstuff
Copy link
Member

Duplicate of #10300 - fixed in #10722 - shipping in v2.50.0 - closing as above.

@tombuildsstuff tombuildsstuff added this to the v2.50.0 milestone Mar 4, 2021
@ghost
Copy link

ghost commented Mar 5, 2021

This has been released in version 2.50.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.50.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Apr 3, 2021

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 as resolved and limited conversation to collaborators Apr 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants