You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature description :
Since terraform executable is required to transform the plan.out into plan.out.json, we need to have that executable lives within the Docker image. On the other hand, it is also possible that different minor versions are being used for different purposes.
Suggested Solution description ( if you have any ) :
To enable #334 and fix problems that has been reported in #363, terraform-compliance Docker image must have access to all latest versions of supported terraform minor versions within the image. Currently it is 0.12.29 and 0.13.2.
Have an autodetection system - if possible - to understand if the plan is created via which version of terraform. Then try to execute terraform show -json plan.out > plan.out.json command via the required version.
If there are no autodetection available, then try from the latest and keep trying if its failed.
Have a TF_VERSION (e.g. 0.12.29, 0.13.1) or TF_MINOR_VERSION (e.g. 12, 13) environment variable that can be usable to override detection mechanism.
Describe alternatives you've considered :
It is also possible to download the terraform executable on the fly on a failure or if given/required version does not exist in the system.
After having multiple versions of the terraform, it is also possible to have a wrapper script that will point to the right terraform executable for having a wider system usage.
The text was updated successfully, but these errors were encountered:
This is an absolutely needed feature. Case in point, I ran Terraform-Compliance in a CI/CD pipeline, which installed the latest version of Terraform; but Terraform-Compliance failed with the error...
Failed to read plan from plan file: plan file was created by Terraform 0.14.5,
but this is 0.14.4; plan files cannot be transferred between different
Terraform versions.
Being restricted to a specific version of Terraform, especially when that required version is not documented anywhere (!) is not a great user experience.
It looks like we need to focus on documentation, thanks for the feedback @AErmie ! 🎉
In order to unblock you with a workaround, you can just install terraform-compliance in the CI pipeline (e.g. https://github.com/terraform-compliance/github_action) and use it natively instead of running via Docker image while we are implementing this feature.
Feature Request
Feature description :
Since
terraform
executable is required to transform theplan.out
intoplan.out.json
, we need to have that executable lives within the Docker image. On the other hand, it is also possible that different minor versions are being used for different purposes.Suggested Solution description ( if you have any ) :
To enable #334 and fix problems that has been reported in #363,
terraform-compliance
Docker image must have access to all latest versions of supported terraform minor versions within the image. Currently it is 0.12.29 and 0.13.2.terraform show -json plan.out > plan.out.json
command via the required version.TF_VERSION
(e.g. 0.12.29, 0.13.1) orTF_MINOR_VERSION
(e.g. 12, 13) environment variable that can be usable to override detection mechanism.Describe alternatives you've considered :
The text was updated successfully, but these errors were encountered: