Skip to content
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

Terraform output fails when providing argument #269

Closed
rfrerebe-stx opened this issue Dec 9, 2024 · 1 comment · Fixed by #270
Closed

Terraform output fails when providing argument #269

rfrerebe-stx opened this issue Dec 9, 2024 · 1 comment · Fixed by #270

Comments

@rfrerebe-stx
Copy link
Contributor

Terraform will fail when providing argument

    - task: TerraformTaskV4@4
      displayName: "Terraform output"
      inputs:
        provider: 'azurerm'
        command: 'output'
        commandOptions: 'token'
        workingDirectory: '$(System.DefaultWorkingDirectory)/terraform'

Error :

Starting: Terraform output
==============================================================================
Task         : Terraform
Description  : Execute terraform commands to manage resources on AzureRM, Amazon Web Services(AWS) and Google Cloud Platform(GCP). v4.241.11
Version      : 4.241.33
Author       : Microsoft Corporation
Help         : [Learn more about this task](https://aka.ms/devlabs/ado/tf/task/v4)
==============================================================================
/opt/hostedtoolcache/terraform/1.10.1/x64/terraform output token -json
╷
│ Error: Unexpected argument
│ 
│ The output command expects exactly one argument with the name of an output
│ variable or no arguments to show all outputs.
╵

For more help on using this command, run:
  terraform output -help
Finishing: Terraform output

Work around use custom command

    - task: TerraformTaskV4@4
      displayName: "Terraform output"
      inputs:
        provider: 'azurerm'
        command: 'custom'
        commandOptions: 'output token'
        workingDirectory: '$(System.DefaultWorkingDirectory)/terraform'
@mericstam
Copy link
Collaborator

mericstam commented Dec 15, 2024

hi,
LGTM, I will run a couple of tests then approve

br
Manuel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants