Azurerm_app_configuration_key 403, although azure sp has rights

When trying to add appconfig keys by either type=kv or vault, i receive a 403 error.
The executing AD Service Principal has both Owner and App Configuration Data Owner Rights.

Error Message:

Error: got http status code 403 while checking for key's "ServiceBusSettings:CancelledCustomersEvent:QueueName" existence: appconfiguration.BaseClient#GetKeyValue: Failure responding to request: StatusCode=403 -- Original Error: autorest/azure: error response cannot be parsed: "" error: EOF
with module.appsetting-cancelledcustomers-queuename.azurerm_app_configuration_key.appconfigkv
on ../../modules/appconfigkv/main.tf line 1, in resource "azurerm_app_configuration_key" "appconfigkv":
resource "azurerm_app_configuration_key" "appconfigkv" {
got http status code 403 while checking for key's "ServiceBusSettings:CancelledCustomersEvent:QueueName" existence: appconfiguration.BaseClient#GetKeyValue: Failure responding to request: StatusCode=403 -- Original Error: autorest/azure: error response cannot be parsed: "" error: EOF

Nevermind. I added the wrong SP as App Configuration Data Owner

1 Like

had the same error which is happening on the first run randomly.