Attempting to use the `Pulumi@1` Azure Devops Task...
# azure
m
Attempting to use the
Pulumi@1
Azure Devops Task with an Azure storage account backend, I receive the following error:
##[error]Couldn't determine which login method to use. This task extension supports Pulumi Service backend and self-managed backends. Learn more at <https://www.pulumi.com/docs/intro/concepts/state>.
I am providing the AZURE_STORAGE_CONTAINER env var (it's sourced form a variable group above). The code here implies that with this env provided, the azure backend should be picked. Am I missing an input or is there a working example someone could provide? I've also tried both linux and windows agents.
Copy code
steps:
  - task: Pulumi@1
    inputs:
      azureSubscription: <service principal connection>
      command: 'up'
      cwd: '$(ProjectDirectory)/'
      stack: '${{ parameters.stack }}'
      args: '--yes'
    env:
      PULUMI_CONFIG_PASSPHRASE: $(Pulumi.Passphrase)
      AZURE_STORAGE_CONTAINER: $(Pulumi.StorageContainer)
      AZURE_STORAGE_ACCOUNT: $(Pulumi.StorageAccount)
      AZURE_STORAGE_KEY: $(Pulumi.StorageKey)
I discovered the issue. The env var does not appear to work for this variable. Instead, the following works:
Copy code
variables:
    AZURE_STORAGE_CONTAINER: $(Pulumi.StorageContainer)

  steps:
  - task: Pulumi@1
    inputs:
      azureSubscription: <service principal connection>
      command: 'up'
      cwd: '$(ProjectDirectory)/'
      stack: '${{ parameters.stack }}'
      args: '--yes'
    env:
      PULUMI_CONFIG_PASSPHRASE: $(Pulumi.Passphrase)
      AZURE_STORAGE_ACCOUNT: $(Pulumi.StorageAccount)
      AZURE_STORAGE_KEY: $(Pulumi.StorageKey)