You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While running Terraform to assign the "AcrPull" role ion Azure Container Registry to an Azure Web App, execution failes with the following error:
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to azurerm_role_assignment.acr_Pull, 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.
# 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
data "azurerm_container_registry" "acr" {
name = var.acrName
resource_group_name = var.acrRGName
}
azurerm_role_assignment.acr_Pull: Creating...
azurerm_role_assignment.acr_Pull: Still creating... [10s elapsed]
azurerm_role_assignment.acr_Pull: Still creating... [20s elapsed]
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to azurerm_role_assignment.acr_Pull, 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.
╵
Panic Output
Expected Behaviour
Actual Behaviour
Steps to Reproduce
terraform apply
Important Factoids
References
#0000
The text was updated successfully, but these errors were encountered:
giovannifl
changed the title
Terraform fails trying to assign a role to an Azure Web App
Terraform fails when trying to assign a role to an Azure Web App
Jun 13, 2021
Hey @giovannifl
I just had this problem yesterday on #12195 and @tombuildsstuff helped me. It seems you'll need to upgrade your provider version to the newest v2.63.0 (or just v2.62.1) or downgrade to older version since there was a regression in v2.62.0.
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.
While running Terraform to assign the "AcrPull" role ion Azure Container Registry to an Azure Web App, execution failes with the following error:
Below there is the affected code:
Community Note
Terraform (and AzureRM Provider) Version
Terraform v1.0.0
on linux_amd64
Affected Resource(s)
azurerm_container_registry
azurerm_role_assignment
Terraform Configuration Files
data "azurerm_container_registry" "acr" {
name = var.acrName
resource_group_name = var.acrRGName
}
resource "azurerm_role_assignment" "acr_Pull" {
scope = data.azurerm_container_registry.acr.id
role_definition_name = "AcrPull"
principal_id = azurerm_app_service.wap.identity[0].principal_id
}
Debug Output
azurerm_role_assignment.acr_Pull: Creating...
azurerm_role_assignment.acr_Pull: Still creating... [10s elapsed]
azurerm_role_assignment.acr_Pull: Still creating... [20s elapsed]
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to azurerm_role_assignment.acr_Pull, 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.
╵
Panic Output
Expected Behaviour
Actual Behaviour
Steps to Reproduce
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: