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
Error: "principal_id": required field is not set - for azurerm_role_assignment #7009
Comments
hi @robkwork Thanks for opening this issue. Taking a look through there's a couple of issues here:
The first of those should be fixed via #7024 - which'll raise an error when a User Assigned Identity is not found - at which point the second error should become more apparent. To solve the second error you can use a Thanks! |
Thanks @tombuildsstuff - i'll use the |
Thanks again @tombuildsstuff - this worked:
|
This has been released in version 2.11.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.11.0"
}
# ... other configuration ... |
Follow up on this issue, can the azurerm_kubernetes_cluster resource output the |
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! |
Community Note
Terraform (and AzureRM Provider) Version
Terraform v0.12.24
Affected Resource(s)
azurerm_role_assignment
Terraform Configuration Files
Expected Behavior
When running
terraform plan
orterraform apply
, i'm expecting it to parse through and assign theNetwork Contributor
role to the newly created identity while building the AKS cluster.Actual Behavior
When the above two resources are in the main.tf upon AKS cluster creation, it errors out with:
Workaround
I can comment out the bottom resource, run the apply and create the cluster, then uncomment the bottom resource, run the apply again and it will create the network contributor role to the identity.
Steps to Reproduce
terraform apply
with theazurerm_role_assignment
block uncommentedThe text was updated successfully, but these errors were encountered: