Add applied action invocation message type

pull/38246/head
Roniece 4 months ago committed by Roniece Ricardo
parent a37b85ef15
commit 1084dccefa

@ -12,11 +12,12 @@ const (
MessageDiagnostic MessageType = "diagnostic"
// Operation results
MessageResourceDrift MessageType = "resource_drift"
MessagePlannedChange MessageType = "planned_change"
MessagePlannedActionInvocation MessageType = "planned_action_invocation"
MessageChangeSummary MessageType = "change_summary"
MessageOutputs MessageType = "outputs"
MessageResourceDrift MessageType = "resource_drift"
MessagePlannedChange MessageType = "planned_change"
MessagePlannedActionInvocation MessageType = "planned_action_invocation"
MessageAppliedActionInvocation MessageType = "applied_action_invocation"
MessageChangeSummary MessageType = "change_summary"
MessageOutputs MessageType = "outputs"
// Hook-driven messages
MessageApplyStart MessageType = "apply_start"

@ -103,6 +103,14 @@ func (v *JSONView) PlannedActionInvocation(action *json.ActionInvocation) {
)
}
func (v *JSONView) AppliedActionInvocation(action *json.ActionInvocation) {
v.log.Info(
fmt.Sprintf("applied action invocation: %s", action.Action.Action),
"type", json.MessageAppliedActionInvocation,
"invocation", action,
)
}
func (v *JSONView) ResourceDrift(c *json.ResourceInstanceChange) {
v.log.Info(
fmt.Sprintf("%s: Drift detected (%s)", c.Resource.Addr, c.Action),

Loading…
Cancel
Save