@@ -92,6 +92,8 @@ type Plan struct {
9292 // Timestamp contains the static timestamp that Terraform considers to be
9393 // the time this plan executed, in UTC.
9494 Timestamp string `json:"timestamp,omitempty"`
95+
96+ ActionInvocations []* ActionInvocation `json:"action_invocations,omitempty"`
9597}
9698
9799// ResourceAttribute describes a full path to a resource attribute
@@ -140,15 +142,6 @@ func (p *Plan) Validate() error {
140142 return nil
141143}
142144
143- func isStringInSlice (slice []string , s string ) bool {
144- for _ , el := range slice {
145- if el == s {
146- return true
147- }
148- }
149- return false
150- }
151-
152145func (p * Plan ) UnmarshalJSON (b []byte ) error {
153146 type rawPlan Plan
154147 var plan rawPlan
@@ -305,3 +298,35 @@ type DeferredResourceChange struct {
305298 // Change contains any information we have about the deferred change.
306299 ResourceChange * ResourceChange `json:"resource_change,omitempty"`
307300}
301+
302+ type ActionInvocation struct {
303+ // Address is the absolute action address
304+ Address string `json:"address,omitempty"`
305+ // Type is the type of the action
306+ Type string `json:"type,omitempty"`
307+ // Name is the name of the action
308+ Name string `json:"name,omitempty"`
309+
310+ // ConfigValues is the JSON representation of the values in the config block of the action
311+ ConfigValues interface {} `json:"config_values,omitempty"`
312+ ConfigSensitive interface {} `json:"config_sensitive,omitempty"`
313+ ConfigUnknown interface {} `json:"config_unknown,omitempty"`
314+
315+ // ProviderName allows the property "type" to be interpreted unambiguously
316+ // in the unusual situation where a provider offers a type whose
317+ // name does not start with its own name, such as the "googlebeta" provider
318+ // offering "google_compute_instance".
319+ ProviderName string `json:"provider_name,omitempty"`
320+
321+ LifecycleActionTrigger * LifecycleActionTrigger `json:"lifecycle_action_trigger,omitempty"`
322+ InvokeActionTrigger * InvokeActionTrigger `json:"invoke_action_trigger,omitempty"`
323+ }
324+
325+ type LifecycleActionTrigger struct {
326+ TriggeringResourceAddress string `json:"triggering_resource_address,omitempty"`
327+ ActionTriggerEvent string `json:"action_trigger_event,omitempty"`
328+ ActionTriggerBlockIndex int `json:"action_trigger_block_index"`
329+ ActionsListIndex int `json:"actions_list_index"`
330+ }
331+
332+ type InvokeActionTrigger struct {}
0 commit comments