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

OpenTofu support and JSON recentFile support #435

Merged
merged 105 commits into from
Jun 7, 2024
Merged

Conversation

MatthewJohn
Copy link
Collaborator

Issue #315

#434

Update logic for reading sources for obtaining version to read from next source explicitly if version has not been set.
This handles situations where a source exists (e.g. TOML file, terraform files), but a version constraint cannot be found from the source.
This avoids duplicate checks for existance of sources (such as Terragrunt file), as this was performed in GetParamters and also in the methods to read the config from the source.

Issue #420
…ParamsTOML also checks if the TOML file exists

Issue #420
…sion, as these are handled directly from the GetVersionFromX methods

Issue #420
…ic errors

This was showing a warning as diagnostics from gohcl.DecodeBody was not used.

Issue #420
…uations where no version is available when config files are present

Issue #420
…form_version, as these are handled directly from the GetVersionFromX methods"

This reverts commit 90433e0.
… overriding params Version with environment variable
Previously, the highest priority was the TOML file, however, the new ordering means that terragrunt files have the highest precedence: #420
…suring each configuring overrides the previous
Refactor for creating files in precedence test and ensure files are cleaned up.
Add test to ensure that command line argument for specifying version is handled as highest priority.
Fix version matching, where they were incorrect in the tests
This is not needed, as the DefaultVersion is currently handled by main.go and not the parameter parsing

This reverts commit 49fd706.
@MatthewJohn MatthewJohn linked an issue May 26, 2024 that may be closed by this pull request
…ng by new lines.

Update uses of getTFURLBody to split, where necessary.
Add tests to ensure parsing of hashicorp release page format works as expected

Issue #315
Update release page parsing to iterate through all matches in the release page, rather than iterating through each line.
This adds compatibility with the OpenTofu release page, which is all on one line.

Issue #315
Make use of mock server to return example snippets from upstream release pages

Issue #315
…uired attributes for seperated functionality between Terraform and OpenTofu.

Remove all hard coded defaults, moving to attributes of Product.
Add new methods for handling "product" varients of public methods.
Update previous public methods to call new methods, using Terraform product.

Issue #315
@MatthewJohn MatthewJohn force-pushed the 315-opentofu-support branch 2 times, most recently from f294651 to 565ad6e Compare June 5, 2024 06:15
lib/download.go Show resolved Hide resolved
lib/install.go Show resolved Hide resolved
lib/install.go Show resolved Hide resolved
lib/param_parsing/environment.go Show resolved Hide resolved
lib/param_parsing/parameters.go Show resolved Hide resolved
lib/param_parsing/parameters.go Show resolved Hide resolved
lib/param_parsing/toml.go Show resolved Hide resolved
lib/products.go Show resolved Hide resolved
Copy link
Collaborator

@yermulnik yermulnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Maybe have @warrensbox to sign this off 🤔

@warrensbox
Copy link
Owner

warrensbox commented Jun 6, 2024

@MatthewJohn I need to test a few more cases before merging. Will get it done by 12pm PST on Jun 6.

@warrensbox
Copy link
Owner

@MatthewJohn I need to test a few more cases before merging. Will get it done by 12pm PST on Jun 6.

@MatthewJohn @yermulnik please see remarks on #420

@warrensbox warrensbox merged commit e25a6bc into master Jun 7, 2024
3 checks passed
@warrensbox warrensbox deleted the 315-opentofu-support branch June 7, 2024 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move away from golang openpgp OpenTofu Support
3 participants