Resource Providers
Resource Providers (also known as Dynamic Resource Providers or Custom Resource Providers) allow us to define custom management of cloud resources (e.g., Managing a deployed Access Policy for Azure Keyvault)
Under this section you can find our custom created Resource Providers to extend Pulumi functionality.
More information: https://www.pulumi.com/docs/intro/concepts/resources/dynamic-providers/
⚠️ The outputs of the
createandupdatemethods are used and passed towards thedeletemethod. Therefore, it is crucial to return meaningful values in order to ensure that thedeletemethod is working.
Reference
- Pulumi: https://www.pulumi.com/docs/intro/concepts/resources/dynamic-providers/
- Example - Static Website creation: https://github.com/austindimmer/pulumi-examples/blob/608beff421fe20e092094370823870b90b332116/azure-ts-static-website/staticWebsite.ts
- Example - Custom Provider from A to Z: https://www.youtube.com/watch?v=H4nehfvCLm8&list=PLGNdWBFrIUJc2vqu7kaBpZZHppzqScYPp&index=8
Azure CLI
Custom Resources are manipulated through Azure CLI commands.
They are parsed as a string type and executed through the run() method defined in utils.ts
const keyVaultName = 'example-key-vault';
const objectId = '11111111-1111-1111-1111-111111111111';
let cmd: string = `az keyvault delete-policy --name "${keyVaultName}" --object-id "${objectId}"`;
await run(cmd);