json-output: Add resource drift to machine readable UI

This commit is contained in:
Alisdair McDiarmid
2021-06-29 14:14:31 -04:00
parent f2d1817a57
commit 71a067242d
5 changed files with 250 additions and 23 deletions

View File

@@ -95,6 +95,14 @@ func (v *JSONView) PlannedChange(c *json.ResourceInstanceChange) {
)
}
func (v *JSONView) ResourceDrift(c *json.ResourceInstanceChange) {
v.log.Info(
fmt.Sprintf("%s: Drift detected (%s)", c.Resource.Addr, c.Action),
"type", json.MessageResourceDrift,
"change", c,
)
}
func (v *JSONView) ChangeSummary(cs *json.ChangeSummary) {
v.log.Info(
cs.String(),