Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option to customize flags to terraform init for terraform validate #73

Open
scbunn opened this issue Mar 22, 2022 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@scbunn
Copy link

scbunn commented Mar 22, 2022

Describe the solution you'd like
The terraform lock file is causing issues with terraform validate being run in an automated job. Terraform init is updating the hashes in the lockfile and thus failing the job because it detects changes were made to files.

For now this can be fixed by not checking in the lock file but this is outside of what hashicorp is recommending.

@scbunn scbunn added the enhancement New feature or request label Mar 22, 2022
@scbunn scbunn changed the title add option to all flags to terraform init for terraform validate add option to customize flags to terraform init for terraform validate Mar 22, 2022
@wolfm89
Copy link

wolfm89 commented Sep 1, 2022

@scbunn This is a very late answer but I faced the same problems. What helped me fix it was running

terraform providers lock -platform=linux_amd64 -platform=windows_amd64

This adds all hashes for these two platforms to the lock file. It's also describe at the end of the section https://www.terraform.io/language/files/dependency-lock#new-provider-package-checksums

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants