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_role_assignment produced an unexpected new value: Root resource was present, but now absent #12093

Closed
patpicos opened this issue Jun 7, 2021 · 2 comments

Comments

@patpicos
Copy link

patpicos commented Jun 7, 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.15.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v2.62.0
+ provider registry.terraform.io/hashicorp/random v3.1.0
+ provider registry.terraform.io/hashicorp/template v2.2.0

Affected Resource(s)

+ provider registry.terraform.io/hashicorp/azurerm v2.62.0
+ provider registry.terraform.io/hashicorp/random v3.1.0
+ provider registry.terraform.io/hashicorp/template v2.2.0

Terraform Configuration Files

# Affected resource only:
resource "azurerm_role_assignment" "assign" {
  for_each     = var.assign_mi_to_scopes != null ? var.assign_mi_to_scopes : {}
  principal_id = azurerm_user_assigned_identity.this.principal_id

  scope                = lookup(each.value, "scope", null)
  role_definition_name = lookup(each.value, "role_definition_name", null)
}

Debug Output

Panic Output

Expected Behaviour

The role assignment added

Actual Behaviour

Failure with inconsistent result

Error: Provider produced inconsistent result after apply

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

This is a bug in the provider, which should be reported in the provider's own
issue tracker.

Steps to Reproduce

  1. terraform apply

Important Factoids

None

References

@patpicos patpicos changed the title azurerm_role_assignment azurerm_role_assignment produced an unexpected new value: Root resource was present, but now absent Jun 7, 2021
@patpicos
Copy link
Author

patpicos commented Jun 7, 2021

closing as duplicate. Confirmed downgrading to azurerm 2.61 provides a workaround

@patpicos patpicos closed this as completed Jun 7, 2021
@github-actions
Copy link

github-actions bot commented Jul 8, 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 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 8, 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

2 participants