microsoft / azure-pipelines-terraform

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

Build agents still have mismatched Terraform versions #223

Closed Neutrino-Sunset closed 3 weeks ago

Neutrino-Sunset commented 1 month ago

This issue from 2021 is still an issue.

Terraform Extension Plan and Apply version mismatch

I have a multistage build pipeline, plan in one stage, apply in another. I'm explicitly specifying

  pool:
    vmimage: ubuntu-latest

in each stage. Yet I'm repeatedly getting the following error

│ Error: Failed to read plan from plan file
│ 
│ Cannot read the plan from the given plan file: plan file was created by
│ Terraform 1.8.3, but this is 1.8.4; plan files cannot be transferred
│ between different Terraform versions.

I know I can manually install a specific version into the build agent before running my tasks, but the whole point of using a build agent of a specified vmimage is that I shouldn't have to do that.

The maintainers of the build agents also shouldn't want me to have to do that either. If for every stage of every pipeline that I run I have to manually install every tool my tasks are going to use, then that's going to tie up the build agents for twice as long as necessary, which will cost more, be a waste of money, and result in a less responsive build service for everyone.

It's been over 3 years, please fix it!

mericstam commented 1 month ago

Hi, The terraform extension is not responsible for the build agents default version. There is nothing we as maintainers of this extension can do about it other than to recommend users to use terraform installer task. Regards, Manuel

Neutrino-Sunset commented 1 month ago

Do you know where I should report it instead please?

mericstam commented 1 month ago

Unfortunatly I dont excactly who is responsible for the hosted agents pool. Here are a few links:
read more on MS hosted agents: https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml

the repos for the agents: https://github.com/actions/runner-images

mericstam commented 3 weeks ago

Closing this as it is not related to the actual extension