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

terraform test: don't remove sensitive marks from inputs #35021

Merged
merged 2 commits into from
Apr 18, 2024

Conversation

liamcervante
Copy link
Member

@liamcervante liamcervante commented Apr 18, 2024

Previously, the Terraform plan functionality forbade input values with sensitive marks. The testing framework avoided this by removing the sensitive marks from inputs, and printing a warning if the input variable was not marked as sensitive. As of #34414 the terraform plan can now handle sensitive marks on input values. This means the testing framework no longer needs to remove sensitive marks, and warn users about the sensitive metadata being lost.

There's also a flyby refactoring of the tests in test_test.go to remove the init output from the expected/actual comparisons introduced as part of the recent init command refactoring. We don't care about validating the init output for theses tests.

Fixes #35011

Target Release

1.9.0

Draft CHANGELOG entry

ENHANCEMENTS

  • terraform test: The test framework can now maintain sensitive metadata between run blocks.

@liamcervante liamcervante merged commit 6963c54 into main Apr 18, 2024
6 checks passed
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 liamcervante/35011 branch April 18, 2024 17:53
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 May 19, 2024
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.

Terraform Test wrongly removing sensitive marks and warning now Terraform Core can handle sensitive inputs
2 participants