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

Bug creating 'azurerm_role_assignment' and adding it to state #12195

Closed
OmerLaza opened this issue Jun 13, 2021 · 4 comments
Closed

Bug creating 'azurerm_role_assignment' and adding it to state #12195

OmerLaza opened this issue Jun 13, 2021 · 4 comments

Comments

@OmerLaza
Copy link

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 v1.0.0
on windows_amd64

  • provider registry.terraform.io/hashicorp/azurerm v2.62.0

Affected Resource(s)

  • azurerm.azurerm_role_assignment

Terraform Configuration Files

Full TF here
https://gist.github.com/OmerLaza/6d68de4382e8f2b14e100595774a9b22

Debug Output

https://gist.github.com/OmerLaza/6d68de4382e8f2b14e100595774a9b22

Panic Output

When applying changes to azurerm_role_assignment.example, provider "provider[\"registry.terraform.io/hashicorp/azurerm\"]" produced an unexpected new value: Root │ resource was present, but now absent.

Expected Behaviour

TF creating the resources properly and adding then to the state file.

Actual Behaviour

The apply ending in an error (yet creating the azurerm_role_assignment, but not adding it to the state.

Steps to Reproduce

  1. terraform apply the TF file provided earlier.
@drjwelch
Copy link
Contributor

I have also seen this issue - I think it may be related to #1726. I hacked around it by deleting the resource in the state and the portal; tf was then able to recreate the resource on the next apply.

@tombuildsstuff
Copy link
Contributor

hey @OmerLaza

Unfortunately this was a regression in v2.62.0 which has since been fixed in v2.62.1 - as such you'd need to upgrade to that release (or the latest release v2.63.0) - but since this regressions been fixed I'm going to close this issue for the moment.

Thanks!

@OmerLaza
Copy link
Author

@tombuildsstuff Thanks 😄
I've upgraded the provider to v2.63.0 and the problem has been fixed.

@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 15, 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

4 participants