Version 4 Deployment Failing for Contributor Role
I was upgrading to version 4 and now I can't deploy:
ERROR: error executing step command 'provision': deployment failed: error deploying infrastructure: validating deployment to subscription:
Authorization failed for template resource '_guid_' of type 'Microsoft.Authorization/roleAssignments'
Is there any way to deploy without having the assign roles permission? Can the template be changed to support that? I am a contributor in Azure and want to just deploy.
@lafleurh, you can remove the roleAssignments part of the bicep files. Then change manually the permission on the Azure storage. Doing so you are lowering the security however.
I am in the same situation with Contributor on the Subscription.
Before deployment, I removed all lines with "roleAssignments" in these files:
- src/infra/url-data/url-data.module.bicep
- src/infra/funcstoragea17ca/funcstoragea17ca.module.bicep
Then I ran azd up and it deployed some things. It failed at "Deploying service admin".
In the portal, I added "azr pull" permissions to the Managed Identity on the Container Registry.
Then I ran azd up and it deployed the rest successfully.
Thanks for the tip @fboucher !