How do I set 'keyVaultReferenceIdentity' in Azure AppService?

Use Key Vault references - Azure App Service | Microsoft Docs

mentioned:

userAssignedIdentityResourceId=$(az identity show -g MyResourceGroupName -n MyUserAssignedIdentityName --query id -o tsv)
appResourceId=$(az webapp show -g MyResourceGroupName -n MyAppName --query id -o tsv)
az rest --method PATCH --uri "${appResourceId}?api-version=2021-01-01" --body "{'properties':{'keyVaultReferenceIdentity':'${userAssignedIdentityResourceId}'}}"

but seems like TF Azure provider doesn’t support this.

1 Like

I don’t think it’s supported at the moment so I’ve opened this issue a couple of days ago:

thanks man, will keep eyes on your thread.

The provision for the same has been added now:

r/azurerm_app_service: Make key_vault_reference_identity_id configurable by patst · Pull Request #13720 · hashicorp/terraform-provider-azurerm · GitHub

1 Like