pulumi-az-pipelines-task
pulumi-az-pipelines-task copied to clipboard
Incorrect parsing of args with whitespace
Describe the bug We've tried to use Pulumi Azure DevOps task in a way described below:
- task: Pulumi@1
condition: succeeded()
displayName: 'Pulumi up ${{ parameters.project.dir }} ${{ parameters.stack }}'
inputs:
azureSubscription: ${{ parameters.azureSubscription }}
command: 'up'
loginArgs: 'azblob://my-blob'
versionSpec: 3.71.0
cwd: modules/${{ parameters.project.dir }}
stack: ${{ parameters.stack }}
createStack: true
args: '-y ${{ parameters.pulumiVariables }} --config CDP_API_KEY="ab cd"'
When the task runs, we get the following error:
error: template 'cd"' not found
##[error]Pulumi command exited with code '255' while trying to run 'up -y --config CDP_API_KEY="ab cd"'.
The problem is that CDP_API_KEY
contains a whitespace. We've also tried to enclose the value with the whitespace in ''
.
To Reproduce Steps to reproduce the behavior:
- Create an azure pipeline with the Pulumi task.
- Try to pass a config variable (in args,
--config
) that contains a whitespace
Expected behavior A config variable is correctly passed to pulumi and pulumi up works correctly.