Skip to content

Commit

Permalink
backend/plan: Show warnings even if no changes are needed
Browse files Browse the repository at this point in the history
Backport of hashicorp#24095
Fixes hashicorp#22541 for v0.11
  • Loading branch information
nyurik committed Feb 20, 2020
1 parent fe16e9b commit 83fc731
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ IMPROVEMENTS:
* backend/http: New options for retries on outgoing requests. [GH-19702]
* communicator/ssh: Keepalive support [GH-20437]

BUG FIXES:

* cli: The `terraform plan` command (and the implied plan run by `terraform apply` with no arguments) will now print any warnings that were generated even if there are no changes to be made. [GH-24095]

## 0.11.14 (May 16, 2019)

NEW FEATURES:
Expand Down
2 changes: 2 additions & 0 deletions backend/local/backend_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ func (b *Local) opPlan(
dispPlan := format.NewPlan(plan)
if dispPlan.Empty() {
b.CLI.Output("\n" + b.Colorize().Color(strings.TrimSpace(planNoChanges)))
// Even if there are no changes, there still could be some warnings
b.ShowDiagnostics(diags)
return
}

Expand Down

0 comments on commit 83fc731

Please sign in to comment.