jason-johnson / azure-pipelines-tasks-terraform

Azure Pipelines extension for Terraform
MIT License
121 stars 52 forks source link

Format Terraform files using "fmt" command need "environmentServiceNameXXXX" parameter. #351

Closed aloizeau closed 10 months ago

aloizeau commented 1 year ago

Describe the bug I want to use fmt command from custom option but the task want unnecessary "environmentServiceNameXXXX" parameter.

To Reproduce Steps to reproduce the behavior:

  1. Setup pipeline as (include yaml configuration or screenshots of classic ui editor) `
    • task: TerraformTaskV4@4 displayName: 'Format Terraform files' inputs: provider: 'azurerm' command: 'custom' workingDirectory: './terraform' customCommand: 'fmt' outputTo: 'console'

      environmentServiceNameAzureRM: 'MyAzureService'

      `

  2. Execute pipeline
  3. See error ` Starting: TerraformTaskV4

    Task : Terraform Description : Execute terraform commands to manage resources on AzureRM, Amazon Web Services(AWS) and Google Cloud Platform(GCP) Version : 4.218.21 Author : Microsoft Corporation Help : Learn more about this task

    [error]Error: Input required: environmentServiceNameAzureRM

    Finishing: TerraformTaskV4 `

Expected behavior "environmentServiceNameXXXX" parameter must be optionnal on standard Terraform fmt command.

Pipeline Logs ` Starting: TerraformTaskV4

Task : Terraform Description : Execute terraform commands to manage resources on AzureRM, Amazon Web Services(AWS) and Google Cloud Platform(GCP) Version : 4.218.21 Author : Microsoft Corporation Help : Learn more about this task

[error]Error: Input required: environmentServiceNameAzureRM

Finishing: TerraformTaskV4 ` Agent Configuration

jason-johnson commented 10 months ago

TerraformTaskV4 is not part of this extension. It's part of this one. This extension is found here and does not have the problem you describe.