-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Make sure resource private data is carried through the entire resource lifecycle #21611
Changes from all commits
e2b2f1b
dcab82e
ac2219b
a056b84
49fee6b
4cb6ebe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,6 @@ import ( | |
"encoding/json" | ||
"flag" | ||
"fmt" | ||
"github.com/hashicorp/terraform/internal/initwd" | ||
"github.com/hashicorp/terraform/registry" | ||
"io" | ||
"io/ioutil" | ||
"log" | ||
|
@@ -21,6 +19,9 @@ import ( | |
"syscall" | ||
"testing" | ||
|
||
"github.com/hashicorp/terraform/internal/initwd" | ||
"github.com/hashicorp/terraform/registry" | ||
|
||
"github.com/hashicorp/terraform/addrs" | ||
"github.com/hashicorp/terraform/configs" | ||
"github.com/hashicorp/terraform/configs/configload" | ||
|
@@ -266,7 +267,10 @@ func testState() *states.State { | |
Type: "test", | ||
}.Absolute(addrs.RootModuleInstance), | ||
) | ||
}) | ||
// DeepCopy is used here to ensure our synthetic state matches exactly | ||
// with a state that will have been copied during the command | ||
// operation, and all fields have been copied correctly. | ||
}).DeepCopy() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This However, reading down to see the other changes below I assume the goal here is to make sure that all of the data in the state makes it into the copy, and that makes sense. For the benefit of a future maintainer who won't have the benefit of seeing this line in the context of this PR diff, perhaps a short comment explaining that this is here to implicitly test |
||
} | ||
|
||
// writeStateForTesting is a helper that writes the given naked state to the | ||
|
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.
Just A Comment:
only 20m
😭