Skip to content

Commit eb4679f

Browse files
committed
fixup! fixup! Use ImportPlanVerify
1 parent f085ea6 commit eb4679f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

helper/resource/testing.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,21 @@ type TestStep struct {
700700
// [plancheck]: https://pkg.go.dev/github.com/hashicorp/terraform-plugin-testing/plancheck
701701
ImportPlanChecks ImportPlanChecks
702702

703+
// ImportPlanVerify checks that a generated plan for a plannable import
704+
// (ImportBlockWithID or ImportBlockWithResourceIdentity) agrees with
705+
// the known state of a previous test stepstate values
706+
// that are finally put into the state after import match for all the
707+
// IDs returned by the Import. Note that this checks for strict equality
708+
// and does not respect DiffSuppressFunc or CustomizeDiff.
709+
//
710+
// By default, the prior resource state and import resource state are
711+
// matched by the "id" attribute. If the "id" attribute is not implemented
712+
// or another attribute more uniquely identifies the resource, set the
713+
// ImportStateVerifyIdentifierAttribute field to adjust the attribute for
714+
// matching.
715+
//
716+
// If certain attributes cannot be correctly imported, set the
717+
// ImportStateVerifyIgnore field.
703718
ImportPlanVerify bool
704719

705720
// ImportStateVerify, if true, will also check that the state values

0 commit comments

Comments
 (0)