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

Introduce tfjsonpath Package and Sensitive and Unknown Plan Checks #154

Merged
merged 13 commits into from
Jul 24, 2023

Conversation

SBGoods
Copy link
Contributor

@SBGoods SBGoods commented Jul 19, 2023

This PR implements the design described in [TF-727] Terraform Plugin Testing Sensitive and Unknown Plan Checks and adds the following:

  • tfjsonpath package which defines methods that allows provider developers to traverse Terraform JSON data
  • ExpectUnknownValue() plan check which asserts that the specified attribute is unknown in the plan
  • ExpectSensitiveValue() plan check which asserts that the specified attribute is marked sensitive in the plan

@SBGoods SBGoods requested a review from a team as a code owner July 19, 2023 22:30
Copy link
Contributor

@bendbennett bendbennett left a comment

Choose a reason for hiding this comment

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

Great job!

Left a couple of minor comments.

The documentation is superb. I particularly like the the methodical 1-2-1 comparison of SDKv2 and framework syntax. I'me wondering whether the schema structures that are described in this context are more broadly useful in terms of providing "templates" for provider developers that are migrating from SDKv2 to the framework?

@SBGoods SBGoods requested a review from a team July 20, 2023 20:51
Copy link
Contributor

@bendbennett bendbennett left a comment

Choose a reason for hiding this comment

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

Looks really great 🚀

@bflad bflad added this to the v1.4.0 milestone Jul 21, 2023
@bflad bflad added the enhancement New feature or request label Jul 21, 2023
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Overall this looks really good, optimistically approving barring some of the below suggestions. 🚀

plancheck/expect_sensitive_value.go Show resolved Hide resolved
plancheck/expect_unknown_value.go Show resolved Hide resolved
tfjsonpath/path.go Outdated Show resolved Hide resolved
tfjsonpath/path.go Outdated Show resolved Hide resolved
tfjsonpath/path.go Outdated Show resolved Hide resolved
@SBGoods SBGoods merged commit ebffbe1 into main Jul 24, 2023
4 checks passed
@SBGoods SBGoods deleted the SBGoods/sensitive-unknown-planchecks branch July 24, 2023 13:52
@github-actions
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 Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants