-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provider does not automatically pick up credentials in Azure Shell #74
Comments
So, this is still a problem today. I think it's important to make To work around the problem, I had to set two config values. First,
which was solved by Terraform doesn't seem to need an explicit configuration to use MSI / nor the subscription ID. It seems to be responding to Questions:
|
For the reference, here is the script that I use in Azure Cloud Shell to make pulumi work without any additional configs in stack: #!/usr/bin/env bash
set -e
export ARM_SUBSCRIPTION_ID=`az account show --output=json | jq -r -M '.id'`
export ARM_TENANT_ID=`az account show --output=json | jq -r -M '.tenantId'`
export ARM_MSI_ENDPOINT=$MSI_ENDPOINT
if [ -z "$ARM_MSI_ENDPOINT" ]; then
export ARM_USE_MSI=false
else
export ARM_USE_MSI=true
fi
~/.pulumi/bin/pulumi "$@" I basically copied it from the pre-installed terraform script. This issue exists for one year and is still not assigned to any release... Shall we at least agree on how it should eventually work? Some options:
|
If the fourth option is something we can do in our layer, that feels by far the best. Have you looked into whether that might be possible? If not solvable in our layer, perhaps makes sense to contribute as an improvement to the upstream Azure Terraform Provider? It may help them to avoid needing that awkward wrapper as well. |
When using the Azure Shell in the Azure Portal (or from VS Code), you get ambient credentials for you Azure subscription which allow tools like
az
to work without need for additional login/configuration.However, the Pulumi Azure Provider does not appear to pick these up automatically:
The text was updated successfully, but these errors were encountered: