forked from hashicorp/terraform-config-inspect
-
Notifications
You must be signed in to change notification settings - Fork 0
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
OPS-8302 Merge upstream to support TF 1.x syntax #11
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
mrwacky42
commented
Feb 15, 2022
- deps: Migrate from github.com/hashicorp/hcl2 to github.com/hashicorp/hcl/v2 (deps: Migrate from github.com/hashicorp/hcl2 to github.com/hashicorp/hcl/v2 hashicorp/terraform-config-inspect#34)
- contributing: terraform-config-inspect is feature complete (contributing: terraform-config-inspect is feature complete hashicorp/terraform-config-inspect#35)
- terraform.required_providers provider source (terraform.required_providers provider source hashicorp/terraform-config-inspect#37)
- Fix Markdown rendering
- Cleanup Readme formatting
- Standardize directory for test data
- Migrate to Circle
- fix: disambiguate variable defaults with "empty" values from undefined (fix: disambiguate variable defaults with "empty" values from undefined hashicorp/terraform-config-inspect#24)
- Merge source across required_providers blocks
- Multiple provider source attributes is an error
- Allow parsing module from any filesystem (Allow parsing module from any filesystem hashicorp/terraform-config-inspect#49)
- Expose lower-level hcl.File load function (Expose lower-level LoadModuleFromFile function hashicorp/terraform-config-inspect#53)
- Support the sensitive attribute on outputs (Feature Request: Support sensitive attribute for outputs hashicorp/terraform-config-inspect#55) (Support the sensitive attribute on outputs (#55) hashicorp/terraform-config-inspect#56)
- tfconfig: decode provider aliases (tfconfig: decode provider aliases hashicorp/terraform-config-inspect#54)
- allow parsing of required_providers containing ref
- Expose configuration_aliases from required_providers (Expose configuration_aliases from required_providers hashicorp/terraform-config-inspect#60)
- README: The latest releases of this library support the Terraform v0.15 language
- README: This library is compatible with the Terraform 1.0 language
- README: Updated note about compatibility
- Parse the sensitive key for input variables
- Remove Sensitive property for legacy modules
- Update CircleCI config to fix build failures
- Give up on 1.11.13, replace with 1.17.3
- update circle config and docker mirror
- Fixup after merge
* tfconfig: add parser for new (optional) required_providers syntax This is a breaking change: module.ProviderRequirements is now a map[string]ProviderRequirement instead of map[string][]string, and the json output has changed accordingly. The following syntaxes are now supported: terraform { required_providers { // new syntax "cloud" = { source = "hashicorp/cloud" version = "1.0.0" } // original syntax is also supported "cloud" = "1.0.0" } }
Fix Markdown rendering
Use standard name for fixtures dir per Go conventions https://golang.org/cmd/go/#hdr-Test_packages
Use standard name for fixtures dir per Go conventions
Migrate from Travis -> Circle
hashicorp#24) - Variable struct and json representation now have an explicit `required` field to disambiguate between a variable with a default value which may either be `null` or the variable type's zero value
If multiple terraform.required_providers blocks are in the config, we already merge the version constraints for each provider. We should also merge the source attribute, and warn if there are duplicates. Consider the following configuration: terraform { required_providers { foo = { version = "1.0.0" } } } terraform { required_providers { foo = { source = "abc/foo" } } } Before this commit, this would result in a provider requirement for "foo" with version constraint "1.0.0", but no "source". This commit merges the source attribute from the second block into this requirement.
Previously we were diagnosing multiple provider different provider source attribute values as a warning, but this is really a configuration error. This commit updates the diagnostic to be an error, and adds a forced failure in the legacy parser when a `required_providers` block is encountered to ensure that the error propagates.
…ce-multiple-blocks Merge source across required_providers blocks
* Allow parsing from any filesystem * avoid caching parsed files
Add a "sensitive" attribute to outputs. If sensitive is not specified or is false it will not be present in the Output object as per omitempty behavior.
The syntax for configuration_aliases contains bare references to match their use in other parts of the configuration. These however cannot be decoded directly without an EvalContext, as they represent variables. Refactor decodeRequiredProvidersBlock to use the lower level ExprMap function.
…ders allow parsing of required_providers containing ref
We now have 1.0 compatibility promises, so we can be more specific in what this library can do.
Parse the sensitive key for input variables
Fix CI failures
GabeL7r
approved these changes
Feb 15, 2022
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.
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.