In Terraform Cloud you have the possibility to mark variables as sensitive. This is supposed to hide them from outputs and only allow you to set a new value.

In reality, you can proceed as follows to get the sensitive variable value. This procedure assumes that you already have a sensitive variable defined, and that its value is set

  1. define a new variable, check hcl
  2. let its value empty
  3. trigger a plan

In the plan's error message you'll get the sensitive variable output.

This has been shared with Terraform Cloud support and flagged as intended design. I find this disappointing in the sense that