pulumi / pulumi-az-pipelines-task

Azure Pipelines task extension for running Pulumi apps.
https://marketplace.visualstudio.com/publishers/pulumi
Apache License 2.0
27 stars 19 forks source link

Fix for using Azure Storage backend with env vars and Azure KeyVault secrets provider #51

Closed praneetloke closed 4 years ago

praneetloke commented 4 years ago

I believe this should fix the issues #44, #48 and potentially #50 as well. The 3 issues are related to this task executing the pulumi login command in a shell without the process.env vars mapped to the executing shell. This prevented users from being able to use an Azure Storage backend when they would set additional env vars such as the AZURE_STORAGE_ACCOUNT and the AZURE_STORAGE_KEY env vars in the Pulumi step.

The other issue was that when using an Azure Service Connection, this task was only setting the ARM_* env vars, but not AZURE_* as required by the Azure SDK for Go, which is used by Pulumi for supporting Azure KeyVault as a secrets provider.