Skip to content

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

Description

@scbunn

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.

Activity

  1. 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[/+] on Mar 22, 2022
  2. wolfm89 commented on Sep 1, 2022

    @wolfm89

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions