diff --git a/internal/command/format/diff.go b/internal/command/format/diff.go index 3d08109e54..1c1da14f48 100644 --- a/internal/command/format/diff.go +++ b/internal/command/format/diff.go @@ -107,6 +107,11 @@ func ResourceChange( case plans.ResourceInstanceDeleteBecauseNoResourceConfig: buf.WriteString(fmt.Sprintf("\n # (because %s is not in configuration)", addr.Resource.Resource)) case plans.ResourceInstanceDeleteBecauseNoModule: + // FIXME: Ideally we'd truncate addr.Module to reflect the earliest + // step that doesn't exist, so it's clearer which call this refers + // to, but we don't have enough information out here in the UI layer + // to decide that; only the "expander" in Terraform Core knows + // which module instance keys are actually declared. buf.WriteString(fmt.Sprintf("\n # (because %s is not in configuration)", addr.Module)) case plans.ResourceInstanceDeleteBecauseWrongRepetition: // We have some different variations of this one