-
Notifications
You must be signed in to change notification settings - Fork 14
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
Consider Known Value and Type Plan Checks for Resource Attributes and Output Values #243
Labels
enhancement
New feature or request
Milestone
Comments
bendbennett
added a commit
that referenced
this issue
Dec 18, 2023
bendbennett
added a commit
that referenced
this issue
Dec 18, 2023
bendbennett
added a commit
that referenced
this issue
Dec 18, 2023
…pe and value, and known value type and value (#243)
bendbennett
added a commit
that referenced
this issue
Dec 18, 2023
bendbennett
added a commit
that referenced
this issue
Dec 18, 2023
bendbennett
added a commit
that referenced
this issue
Dec 18, 2023
bendbennett
added a commit
that referenced
this issue
Dec 18, 2023
bendbennett
added a commit
that referenced
this issue
Dec 18, 2023
bendbennett
added a commit
that referenced
this issue
Dec 20, 2023
bendbennett
added a commit
that referenced
this issue
Jan 3, 2024
bendbennett
added a commit
that referenced
this issue
Jan 3, 2024
bendbennett
added a commit
that referenced
this issue
Jan 3, 2024
bendbennett
added a commit
that referenced
this issue
Jan 4, 2024
…merical value representation in the plan (#243)
bendbennett
added a commit
that referenced
this issue
Jan 4, 2024
bendbennett
added a commit
that referenced
this issue
Jan 4, 2024
bendbennett
added a commit
that referenced
this issue
Jan 4, 2024
…ove references to KnownValue interface (#243)
bendbennett
added a commit
that referenced
this issue
Jan 4, 2024
bendbennett
added a commit
that referenced
this issue
Jan 4, 2024
bendbennett
added a commit
that referenced
this issue
Jan 4, 2024
bendbennett
added a commit
that referenced
this issue
Jan 4, 2024
bendbennett
added a commit
that referenced
this issue
Jan 4, 2024
bendbennett
added a commit
that referenced
this issue
Jan 4, 2024
bendbennett
added a commit
that referenced
this issue
Jan 5, 2024
bendbennett
added a commit
that referenced
this issue
Jan 5, 2024
…ue, ExpectKnownOutputValue and ExpectKnownOutputValueAtPath (#243)
bendbennett
added a commit
that referenced
this issue
Jan 15, 2024
bendbennett
added a commit
that referenced
this issue
Jan 15, 2024
bendbennett
added a commit
that referenced
this issue
Jan 15, 2024
bendbennett
added a commit
that referenced
this issue
Jan 15, 2024
…and `ExpectKnownOutputValueAtPath` (#248) * Add KnownValue interface and types (#243) * Add ExpectKnownValue plan check (#243) * Handling different permutations for equality checking of interface type and value, and known value type and value (#243) * Adding tests for missing resource, and attribute value null (#243) * Adding plan checks for known output value and known output value at path (#243) * Adding documentation (#243) * Adding changelog entries (#243) * Adding TerraformVersionChecks (#243) * Modifying to handle numerical values returned as json.Number for tfjson.Plan (#243) * Renaming known value constructors (#243) * Refactoring to Check interface (#243) * Linting (#243) * Modifying known value check error messages and tests (#243) * Updating tests for ExpectKnownValue, ExpectKnownOutputValue and ExpectKnownOutputValueAtPaath (#243) * Adding changelog entry to note the switch to using json.Number for numerical value representation in the plan (#243) * Remove reference to state checks (#243) * Moving concepts under title and removing reference to Framework types (#243) * Updating Go doc comments to clarify usage of partial equality and remove references to KnownValue interface (#243) * Modifying known-values.mdx page description (#243) * Restructuring and updating references to knownvalue.Check (#243) * Adding individual docs pages for each type of known value check (#243) * Removing references to num elements (#243) * Removing references to state (#243) * Adding docs page for custom known value checks (#243) * Fixing error message (#243) * Refactoring to accomodate custom known value checks in ExpectKnownValue, ExpectKnownOutputValue and ExpectKnownOutputValueAtPath (#243) * Apply suggestions from code review Co-authored-by: Brian Flad <bflad417@gmail.com> * Unexporting types that implement known value check (#266) * Document usage of 512-bit precision in the number known value check (#266) * Adding attribute or output path to error message (#266) * Replacing alias in example code (#266) * Rename file (#266) * Renamed list, map, and set element length checks to <List|Map|Set>SizeExact (#243) * Removing ObjectAttributesExact (#243) * Renaming known value check types (#243) --------- Co-authored-by: Brian Flad <bflad417@gmail.com>
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
terraform-plugin-testing version
Use cases
The plancheck package within
terraform-plugin-testing
has plan checks for the following:Being able to assert that resource attributes, and output values in the plan have a known type and value is a use-case that is not yet catered for in the existing plan checks.
Attempted solutions
The only option currently available to provider developers who wish to assert that a resource attribute, or an output value has a known value and type is to implement custom plan checks using the plancheck.PlanCheck interface.
Proposal
The proposal is to
ExpectKnownValue
,ExpectKnownOutputValue
, andExpectKnownOutputValueAtPath
KnownValue
interface and types implementing this interface which can be used within the known value plan checks to assert that a resource attribute, or output value has a specified type and value.The text was updated successfully, but these errors were encountered: