Skip to content
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

tfjson: Add DeferredChanges and Complete to Plan JSON #123

Merged
merged 2 commits into from
May 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ type Plan struct {
// plan.
ResourceChanges []*ResourceChange `json:"resource_changes,omitempty"`

// DeferredChanges contains the change operations for resources that are deferred
// for this plan.
DeferredChanges []*DeferredResourceChange `json:"deferred_changes,omitempty"`

// Complete indicates that all resources have successfully planned changes.
// This will be false if there are DeferredChanges or if the -target flag is used.
Complete bool `json:"complete,omitempty"`

// The change operations for outputs within this plan.
OutputChanges map[string]*Change `json:"output_changes,omitempty"`

Expand Down Expand Up @@ -269,3 +277,13 @@ type PlanVariable struct {
// The value for this variable at plan time.
Value interface{} `json:"value,omitempty"`
}

// DeferredResourceChange is a description of a resource change that has been
// deferred for some reason.
type DeferredResourceChange struct {
// Reason is the reason why this resource change was deferred.
Reason string `json:"reason,omitempty"`

// Change contains any information we have about the deferred change.
ResourceChange *ResourceChange `json:"resource_change,omitempty"`
}
Loading