-
Notifications
You must be signed in to change notification settings - Fork 232
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
acctests: Ignore data sources in imported state in ImportState
steps
#1074
Conversation
ImportStateVerify
stepsImportState
steps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @gdavison.
Could you possibly add a test, perhaps to teststep_providers_test.go, to verify the behaviour? Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For additional context, this change is more permanent for Terraform version 1.3 so this type of change seems appropriate.
Looks good to me once testing, such as #1077, is also included. 🚀
@@ -26,7 +26,7 @@ require ( | |||
github.com/mitchellh/reflectwalk v1.0.2 | |||
github.com/zclconf/go-cty v1.11.0 | |||
golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167 | |||
golang.org/x/tools v0.0.0-20200713011307-fd294ab11aed | |||
golang.org/x/tools v0.1.12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this change required for some reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not directly related to this fix, but was required to run make generate
which is a dependency for make test
.
…tate (#1077) * Adding test coverage for changes in #1074 (#1066) * Skips data sources from both original state and imported state * Adding changelog entry (#1066) Co-authored-by: Graham Davison <[email protected]>
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. |
Starting with Terraform v1.3, the
terraform import
command populates an empty state file with the imported resource and any data sources. Previously, only the target resource was written to the state file. This causes acceptance test steps withImportState
to fail if the configuration contains any data sources.Excludes data sources from both original state and imported state
Closes #1073
Closes #1066