-
Notifications
You must be signed in to change notification settings - Fork 38
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
fix: change tofu unpacking to default to terraform registry #1001
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/187390468 The labels on this github issue will be updated when the story is started. |
when reading a brokerpak and creating the plugins folder, we were defaulting the domain of the providers to registry.opentofu.org instead of registry.terraform.io. This was not consistent with our default for the download location, which is registry.terraform.io. It now defaults to terraform registry in both places. This means brokerpaks which don't indicate any domain in their provider definitions in the manifest.yml file, will need to fully qualify the provider in the required_providers block to avoid errors, as OpenTofu will default to the opentofu registry. [#187379198](https://www.pivotaltracker.com/story/show/187379198)
when fixing [this issue in tofu](opentofu/opentofu#1139) some logic was introduced to change the hostname of the providers to [#187199940](https://www.pivotaltracker.com/story/show/187199940) point to the opentofu registry (in-memory) when executing a show, if the terraform code didn't specify a hostname in the provider's block. However this functionality seems to be buggy and it is renaming providers regardless, which breaks the tf_attribute_skip functionality. A way to disable this rename is to set the OPENTOFU_STATEFILE_PROVIDER_ADDRESS_TRANSLATION environment variable to `0`. This PR implements that workaround for the broker. [#187379198](https://www.pivotaltracker.com/story/show/187379198) Co-authored-by: Felisia Martini <[email protected]>
pivotal-marcela-campo
force-pushed
the
fix_default_tofu_unpacking
branch
from
April 8, 2024 16:19
7ba2d4b
to
b05f8a6
Compare
blgm
requested changes
Apr 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the comment:
We are keeping the default provider registry as terraform's own registry for now instead
of switching to terraform.
Presumably the last word should be OpenTofu?
[#187379198](https://www.pivotaltracker.com/story/show/187379198) Co-authored-by: Marcela Campo <[email protected]>
[#187379198](https://www.pivotaltracker.com/story/show/187379198) Co-authored-by: Felisia Martini <[email protected]>
FelisiaM
approved these changes
Apr 9, 2024
blgm
approved these changes
Apr 9, 2024
pivotal-marcela-campo
changed the title
fix: fix default tofu unpacking
fix: change tofu unpacking to default to terraform registry
Apr 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We are keeping the default provider registry as terraform's own registry for now instead
of switching to OpenTofu's. We had done this during
pak
but had still defaulting to opentofu registrywhen unpacking which caused
registry.opentofu.org
directory instead of the expectedregistry.terraform.io
directory.With this change we expect to have only references to registry.terraform.io unless otherwise specified by the brokerpak both in
Checklist: