atlantis: policy checks and terraform version inconsistent behavior
We currently set which version of terraform to use inside of the terraform block per project like so:
terraform {
required_version = "0.13.5"
}
When implementing policy checks we got some unreadable errors that we eventually figured out is because the default version of terraform is 0.12.12.
We didn’t want to go through a docker deployment so I set the terraform_version in atlantis.yaml for my project/workspaces. I first tested it to v0.15.1 since I saw that is the latest. However, no plans ran because the required version was 0.13.5 and therefore no policy checks ran as it needs the plan file.
So my take on it is this. When the project has nothing set terraform 0.12.12 plans but knows to upgrade to 0.13.5 for the plan. The terraform show however is just reading a plan file.
Is there any way to read the terraform block or perhaps the plan file has the version that made the plan?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (5 by maintainers)
Actually nwm, I was able to reproduce the issue. I will mark it as a bug.
To repro:
@uLan08 I needed to hop on the container and manually run
terraform showas the atlantis user in order to see the actual error message. If your versions are the same and you got no errors during theplanphase it would seem like a different issue.