microsoft / azure-pipelines-terraform

Azure Pipelines tasks for installing Terraform and running Terraform commands in a build or release pipeline.
MIT License
100 stars 61 forks source link

TerraformTask@v4 Plan Multiple Provider Warning conflicts with tflint `terraform_required_providers` #229

Open bn-jswick opened 1 month ago

bn-jswick commented 1 month ago

Hello, I recently converted a pipeline over to using TerraformTasks from running terraform directly via script commands and it is giving me the following warning for provider settings a submodule:

##[warning]Multiple provider blocks specified in the .tf files in the current working directory.

If I remove the provider constraints in the submodule, it conflicts with tflint in that submodules should declare required provider versions:

https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.4.0/docs/rules/terraform_required_providers.md

Can someone point me to some documentation as to why TerraformTasks is throwing a warning for submodules declaring their provider constraints?

Thank you.

mericstam commented 1 month ago

Hi, Not sure why it was implemented in that way. Let me take a look and see if I can decipher why. Br Manuel