Anyone got any notes on Azure DevOps working with ...
# azure
n
Anyone got any notes on Azure DevOps working with Azure storage account state backend. Added Env Variables, but still just getting a error like this
b
What pulumi command are you using? Have you told it what backend to login to?
n
just trying to to a new command, i have added storage account and key to env variables and i have added --cloud-url azblob.
i can see in debug mode asking to connect pulumi account
but i just want to use the state file
interesting got it working by creating a env variable ##[debug]pulumi.access.token=randomword
c
this is my pipeline.yaml snippet when using an Azure Storage Account as backend.
Copy code
- task: Pulumi@1
        displayName: Preview infra changes
        inputs:
          azureSubscription: 'prod'
          command: 'preview'
          args: '--diff'
          stack: 'imagebakery'
          cwd: 'infrastructure'
        env:
          AZURE_STORAGE_ACCOUNT: $(AZURE_STORAGE_ACCOUNT)
          AZURE_STORAGE_CONTAINER: $(AZURE_STORAGE_CONTAINER)
          AZURE_STORAGE_KEY: $(AZURE_STORAGE_KEY)
          PULUMI_CONFIG_PASSPHRASE: $(pulumi.config.passphrase)
c
@nutritious-judge-27316 I am assuming you are using the Pulumi Task for Azure Pipelines?
n
@clever-sunset-76585 That is correct, hopefully, get some time to test David suggestion. I think its login args. throwing me off
c
If you check https://github.com/pulumi/pulumi-az-pipelines-task/blob/master/buildAndReleaseTask/pulumi.ts#L117 you will see that you don't have to worry about the login args at all as long as you supply above env vars to the storage account.
👍 1
n
nice, Thanks @colossal-room-15708 for your help much appericated :)
c
@nutritious-judge-27316 no worries. Happy to help fellow Azure peeps!
c
Actually the login args currently has a bug in the released version. Thought the bug is fixed, a new release has been made yet. I'll take care of that this week. You'll want to use
loginArgs
instead of the env var because it allows you to specify any of the supported cloud backends and not just an Azure one.