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

Parse the sensitive key for input variables #67

Merged
merged 2 commits into from
Nov 15, 2021
Merged

Conversation

kylecarbs
Copy link
Contributor

Fixes #64.

@kylecarbs kylecarbs requested a review from a team as a code owner November 7, 2021 18:01
@hashicorp-cla
Copy link

hashicorp-cla commented Nov 7, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@alisdair alisdair left a comment

Choose a reason for hiding this comment

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

Thanks for adding this! I have one small comment inline to address before merge.

@@ -110,6 +111,7 @@ func loadModuleLegacyHCL(fs FS, dir string) (*Module, Diagnostics) {
Description: block.Description,
Default: block.Default,
Required: block.Default == nil,
Sensitive: block.Sensitive,
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need these changes in the legacy code path. This should only be hit if there are parsing errors due to pre-0.12 configuration language, and since sensitive variables were introduced much later, trying to parse them here isn't helpful.

If I'm mistaken and it's worth keeping these changes here, can you add test coverage? Tests currently still pass after reverting the changes to this file locally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the sensitive property for legacy modules. Rationale seems sound to me!

Copy link
Contributor

@alisdair alisdair left a comment

Choose a reason for hiding this comment

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

Thanks again! The CI failures are not related to this PR, so I'm merging now.

@alisdair alisdair merged commit 49ab3af into hashicorp:master Nov 15, 2021
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.

Feature Request: Support sensitive attribute for variables
3 participants