Skip to content

Commit 1e4ab1d

Browse files
authored
Merge pull request #90 from hashicorp/kmoe/import
plan: add plannable import fields for v1.5
2 parents 327989a + 7f5938b commit 1e4ab1d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

plan.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,28 @@ type Change struct {
208208
// display of sensitive values in user interfaces.
209209
BeforeSensitive interface{} `json:"before_sensitive,omitempty"`
210210
AfterSensitive interface{} `json:"after_sensitive,omitempty"`
211+
212+
// Importing contains the import metadata about this operation. If importing
213+
// is present (ie. not null) then the change is an import operation in
214+
// addition to anything mentioned in the actions field. The actual contents
215+
// of the Importing struct is subject to change, so downstream consumers
216+
// should treat any values in here as strictly optional.
217+
Importing *Importing `json:"importing,omitempty"`
218+
219+
// GeneratedConfig contains any HCL config generated for this resource
220+
// during planning as a string.
221+
//
222+
// If this is populated, then Importing should also be populated but this
223+
// might change in the future. However, not all Importing changes will
224+
// contain generated config.
225+
GeneratedConfig string `json:"generated_config,omitempty"`
226+
}
227+
228+
// Importing is a nested object for the resource import metadata.
229+
type Importing struct {
230+
// The original ID of this resource used to target it as part of planned
231+
// import operation.
232+
ID string `json:"id,omitempty"`
211233
}
212234

213235
// PlanVariable is a top-level variable in the Terraform plan.

0 commit comments

Comments
 (0)