Is it at all possible apply a plan with no changes? (Refresh output)

I have noticed that if I run a terraform apply with the following environment

  • remote state in in Terraform Enterprise/Cloud
  • the plan shows “no changes”

The apply will not run with the above scenario. I can see why this is the case since if there is no changes, there is no point running it.

Previously in other remote states, I would apply a plan with no changes when I am add/updating TF outputs.

How can I do this when I am now using the remote backend of TFE/Cloud? Is it at all possible to add new outputs to a tfstate without running an apply?

Sounds like you just want the terraform output command.

At the moment the only way to update outputs without applying a change is to run terraform refresh from the CLI, which will also synchronize the state with any changes to remote infrastructure and re-read any data sources. There isn’t a Terraform Cloud web-based equivalent for that operation.

There is a GitHub issue #15419 representing that limitation and some documentation of some earlier design work for a solution to it. That work is currently on hold due to priorities being elsewhere, but we use :+1: reactions on the opening comments of issues as one input into prioritization, and you can watch that issue if you’d like to see future updates on it.