-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Unable to create new azurerm_app_configuration_key #23858
Comments
Hi @ianmccaul , the 403 should be the permission issue. When you encounter the 403 error. Can you check at the Portal(choose the App configuration -> click the |
There is no permission higher than |
So, after some additional testing there are some oddities with this. First off it would appear the 'App Configuration Data Owner' has to be created at the same time as the app config otherwise you will get the 403. I would expect it to honor the fact that I have higher level permissions and wouldnt need that. But the fact that if you miss creating that role assignment you have to tear down the app config and recreate it with the role at the same time, otherwise you will get that 403 trying to add keys to the config. It doesnt seem to work if you either assign yourself that permission in the portal, or add it after the fact in terraform. I would prefer my CI/CD principals for apps not have the ability to create role assignments when all they really need is contributor permissions to provision and manage resources. |
Hi @ianmccaul ,
Neither
Could you please check if there are more than one identity, and the one used to provision the app conf key is not assigned with the correct role? |
This is completely incorrect.
This was ran via testing as my identity, so there are no other identities being pulled in. So I am not sure what you're asking here. |
No, please read the doc https://learn.microsoft.com/en-us/azure/azure-app-configuration/concept-enable-rbac#azure-built-in-roles-for-azure-app-configuration And |
Thank you for taking the time to raise this! I am going to close this with @teowa‘s response as an answer. If that is not the case, please provide additional information including the version in which you are still experiencing this issue, thanks! |
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. |
Is there an existing issue for this?
Community Note
Terraform Version
1.6.3
AzureRM Provider Version
3.79.0
Affected Resource(s)/Data Source(s)
azurerm_app_configuration_key
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Creates config key
Actual Behaviour
Receive a 403 error and terraform will just loop until timeout.
Steps to Reproduce
So this issue only happens if you create the app config and the key separately in different apply's. Basically, if you have an app config you created, then in a future stage want to add a new key to it thats when you get the 403. It runs just fine if you create the key with the config in one stage, but all keys are not always known at creation time.
Additionally, I am running this as my account with owner permissions over the tenant. So its not a permission issue, especially considering if I create both at the same time it works fine.
Important Factoids
No response
References
There was an existing issue similar on the v2 version apparently #13229 but this is on 3.79 where I am encountering it.
The text was updated successfully, but these errors were encountered: