You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
body: 'helper/resource: Updated `ImportBlockWith*` import state modes to use the `ExpectNonEmpty` field to allow non-empty import plans to pass successfully.'
Copy file name to clipboardExpand all lines: helper/resource/testing.go
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -674,6 +674,11 @@ type TestStep struct {
674
674
// ID of that resource.
675
675
ImportStatebool
676
676
677
+
// ImportStateKind controls the method of import that is used in combination with the other import-related fields on the TestStep struct.
678
+
//
679
+
// - By default, ImportCommandWithID is used, which tests import by using the ID string with the `terraform import` command. This was the original behavior prior to introducing the ImportStateKind field.
680
+
// - ImportBlockWithID tests import by using the ID string in an import configuration block with the `terraform plan` command.
681
+
// - ImportBlockWithResourceIdentity imports the state using an import configuration block with a resource identity.
677
682
ImportStateKindImportStateKind
678
683
679
684
// ImportStateId is the ID to perform an ImportState operation with.
0 commit comments