Activating "SystemAssigned" Identity in app service and using it in a key vault access policy breaks terraform apply #15167
Labels
upstream/terraform
This issue is blocked on an upstream issue within Terraform (Terraform Core/CLI, The Plugin SDK etc)
v/2.x (legacy)
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
azurerm_app_service
azurerm_key_vault_policy
Terraform Configuration Files
I prepared a terraform configuration to reproduce the issue:
https://github.com/port4949/bugreport-azurerm/blob/master/main.tf
Expected Behaviour
The app service gets a system assigned identity and a key vault access policy is created for this identity.
Actual Behaviour
The apply fails, because the access policy resource tries to read the tenant id and object id of the identity before it is created.
Steps to Reproduce
terraform apply
References
The text was updated successfully, but these errors were encountered: