-
Notifications
You must be signed in to change notification settings - Fork 19
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
PULUMI_ACCESS_TOKEN required when using Azure storage backend #133
Comments
Interesting! I suppose the pipeline task could attempt |
I have encountered a related issue. Similarly to @aonyxrocks I have a stack configured to use Azure storage backend. I have a Azure pipeline template that invokes the pulumi task like so:
Note that I am setting With this configuration, I am getting: This appears to be caused by this line:
It appears to me that the code is checking for Given my pipeline organization it is definitely more convenient to be able to use the |
I'm facing the same issue but with a different perspective. My Pulumi program uses the I think this is the improvement that must be done. |
Can confirm similar issue as both OP and @jlewicki-nevo. The variables:
- name: AZURE_STORAGE_CONTAINER
value: <YOUR_STORAGE_CONTAINER> ... - task: Pulumi@1
inputs:
azureSubscription: $(subscriptionConnectionName)
command: up
args: '--yes --logtostderr'
cwd: $(cwd)
stack: dev
env:
PULUMI_ACCESS_TOKEN: $(pulumiAccessToken)
AZURE_STORAGE_ACCOUNT: $(storageAccount) |
Describe the bug
PULUMI_ACCESS_TOKEN must be set despite an Azure storage account being configured as the backend in
Pulumi.yaml
.To Reproduce
Storage Blob Data Contributor
permissions to the service connection principal at the container scope.Pulumi.yaml
to set the backend url to point to the storage blob container:up
command using the above service connection --> task exits with error message:PULUMI_ACCESS_TOKEN
to a valid token for the pipeline.Expected behavior
Pulumi task determines login method from the Pulumi.yaml and uses storage account + service connection to authenticate, without the need to set
PULUMI_ACCESS_TOKEN
or any other environment variable (e.g.AZURE_STORAGE_KEY
,AZURE_STORAGE_SAS_TOKEN
, etc.).Additional context
I am aware this only works when the backend and deployed resources are in the same tenant (and subscription).
I imagine a dedicated property to use a different service connection to access the backend or a dedicated "pulumi login" pipeline task could help with different scenarios, but that is beside the point.
An Azure key vault as the secrets provider is part of the same setup but was not tested independently.
The text was updated successfully, but these errors were encountered: