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

Backport of Ignore existing package hashes for providers lock command into v1.2 #31478

Conversation

teamterraform
Copy link
Contributor

Backport

This PR is auto-generated from #31389 to be assessed for backporting due to the inclusion of the label 1.2-backport.

The below text is copied from the body of the original PR.


This PR addresses part of the concerns raised in #29958

First, the terraform providers lock command will now ignore any existing hashes in the .terraform.lock.hcl file. It will retrieve new hashes as if there were none already logged and then merge any new hashes into the existing list. There is now no validation of any existing hashes. It does this with the introduction of the InstallNewProvidersForce InstallMode, which is set within providers_lock.go.

Second, the output of the terraform providers lock has been made more verbose. There are three cases tracked for each (provider,platform) pair requested:

  1. There were existing checksums, and nothing new was found or recorded.
  2. There were existing checksums, and new checksums were found and recorded.
  3. There were no existing checksums, and new checksums have been found and recorded.

Full example output:

- Fetching hashicorp/google 4.27.0 for darwin_arm64...
- Retrieved hashicorp/google 4.27.0 for darwin_arm64 (signed by HashiCorp)
- Fetching hashicorp/null 3.1.0 for darwin_arm64...
- Retrieved hashicorp/null 3.1.0 for darwin_arm64 (signed by HashiCorp)
- Fetching hashicorp/aws 4.21.0 for darwin_arm64...
- Retrieved hashicorp/aws 4.21.0 for darwin_arm64 (signed by HashiCorp)
- Obtained hashicorp/null checksums for darwin_arm64; All checksums for this platform were already tracked in the lock file
- Obtained hashicorp/aws checksums for darwin_arm64; Additional checksums for this platform are now tracked in the lock file
- Obtained hashicorp/google checksums for darwin_arm64; This was a new provider and the checksums for this platform are now tracked in the lock file

Success! Terraform has updated the lock file.

Review the changes in .terraform.lock.hcl and then commit to your
version control system to retain the new checksums.

@teamterraform teamterraform force-pushed the backport/liamcervante/providers-lock-force/endlessly-set-dogfish branch from e1f1e93 to 1fecc41 Compare July 20, 2022 12:27
@github-actions
Copy link

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

@liamcervante liamcervante deleted the backport/liamcervante/providers-lock-force/endlessly-set-dogfish branch July 20, 2022 12:50
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants