Search code examples
azure-functionsazure-keyvaultpulumi

How to assign access policy after creation of key vault


I am using Azure-native provider and have the following situation:

  1. A Function App which needs secret URI in AppSettings
  2. A Key Vault which holds the secret and also grants Managed Identity of Function App access to read it.

How can I create it using pulumi? It is chicken or the egg situation. Pulumi azure-native doesn't support managing access policy separately like azure classic provider.


Solution

  • As you said, it's not supported today in the Azure Native provider. The feature is tracked here.

    For now, you can use the resource from the classic provider for this particular use case. You can mix-and-match two providers in the same program as you wish.