Skip to content

Commit

Permalink
Merge pull request #90 from hashicorp/kmoe/import
Browse files Browse the repository at this point in the history
plan: add plannable import fields for v1.5
  • Loading branch information
kmoe authored Jun 8, 2023
2 parents 327989a + 7f5938b commit 1e4ab1d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,28 @@ type Change struct {
// display of sensitive values in user interfaces.
BeforeSensitive interface{} `json:"before_sensitive,omitempty"`
AfterSensitive interface{} `json:"after_sensitive,omitempty"`

// Importing contains the import metadata about this operation. If importing
// is present (ie. not null) then the change is an import operation in
// addition to anything mentioned in the actions field. The actual contents
// of the Importing struct is subject to change, so downstream consumers
// should treat any values in here as strictly optional.
Importing *Importing `json:"importing,omitempty"`

// GeneratedConfig contains any HCL config generated for this resource
// during planning as a string.
//
// If this is populated, then Importing should also be populated but this
// might change in the future. However, not all Importing changes will
// contain generated config.
GeneratedConfig string `json:"generated_config,omitempty"`
}

// Importing is a nested object for the resource import metadata.
type Importing struct {
// The original ID of this resource used to target it as part of planned
// import operation.
ID string `json:"id,omitempty"`
}

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

0 comments on commit 1e4ab1d

Please sign in to comment.