Skip to content

Commit

Permalink
Deprecating ExpectNullOutputValue and ExpectNullOutputValueAtPath pla…
Browse files Browse the repository at this point in the history
…n checks (#266)
  • Loading branch information
bendbennett committed Jan 18, 2024
1 parent 178c2c4 commit c542a70
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plancheck/expect_null_output_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ func (e expectNullOutputValue) CheckPlan(ctx context.Context, req CheckPlanReque
// Due to implementation differences between the terraform-plugin-sdk and the terraform-plugin-framework, representation of null
// values may differ. For example, terraform-plugin-sdk based providers may have less precise representations of null values, such
// as marking whole maps as null rather than individual element values.
//
// Deprecated: Use ExpectKnownOutputValue with knownvalue.NullExact instead.
// ExpectNullOutputValue will be removed in the next major version release.
//
// [ExpectKnownOutputValue]: https://pkg.go.dev/github.com/hashicorp/terraform-plugin-testing/plancheck#ExpectKnownOutputValue
// [NullExact]: https://pkg.go.dev/github.com/hashicorp/terraform-plugin-testing/knownvalue#NullExact
func ExpectNullOutputValue(outputAddress string) PlanCheck {
return expectNullOutputValue{
outputAddress: outputAddress,
Expand Down
6 changes: 6 additions & 0 deletions plancheck/expect_null_output_value_at_path.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ func (e expectNullOutputValueAtPath) CheckPlan(ctx context.Context, req CheckPla
// Due to implementation differences between the terraform-plugin-sdk and the terraform-plugin-framework, representation of null
// values may differ. For example, terraform-plugin-sdk based providers may have less precise representations of null values, such
// as marking whole maps as null rather than individual element values.
//
// Deprecated: Use ExpectKnownOutputValueAtPath with knownvalue.NullExact instead.
// ExpectNullOutputValueAtPath will be removed in the next major version release.
//
// [ExpectKnownOutputValueAtPath]: https://pkg.go.dev/github.com/hashicorp/terraform-plugin-testing/plancheck#ExpectKnownOutputValueAtPath
// [NullExact]: https://pkg.go.dev/github.com/hashicorp/terraform-plugin-testing/knownvalue#NullExact
func ExpectNullOutputValueAtPath(outputAddress string, valuePath tfjsonpath.Path) PlanCheck {
return expectNullOutputValueAtPath{
outputAddress: outputAddress,
Expand Down

0 comments on commit c542a70

Please sign in to comment.