hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io/
Other
42.11k stars 9.47k forks source link

include source along with "(known after apply)" #25043

Open bcsgh opened 4 years ago

bcsgh commented 4 years ago

Current Terraform Version

Terraform v0.12.24

Use-cases

While running a terraform plan that will create multiple interconnected resources it is common to get (known after apply) as the value for some of those interconnects.

While that is technically correct it is significantly less useful than it could be. In my case, and in most cases, humans don't actually care about the identifier that will be filed in but rather which things it points to. In the case where that things is something else that terraform is going to crate, transform generally already has a meaningful name for it: the name of the things to be created that the name will be extracted from. It would be nice if terraform would include that in the output.

Attempted Solutions

n/a

Proposal

Append the un-evaluated expression resulting in "(known after apply)". There are likely cases where some special cases can do ever better, but the text of the expression would server as a good baseline.

awilkins commented 4 years ago

I'd also love to see the evaluated expressions provided for known values ; would be great to have a way to see what parts of your planned state are down to expressions you provided, and also what parts emerge from defaults, calculated / implied values, etc.

bryanasdev000 commented 4 years ago

+1 From me.

It is always good to have a little more predictability.

jcabillot commented 1 year ago

Why isn't there more love for this bug affecting everyone :( ?
When I have to review policy it's impossible to understand what will be deployed.