Terraform Graph Evaluation

Why are terraform provider configurations not treated like other nodes in the dependency tree? At the end of the day, provider, resource, data, module and local are all the same, yet have completely different rules, seemingly arbitrarily. They should all be able to be resolved at runtime. If they can’t be calculated during the ‘plan’ stage, their value should be determined after creation.

Terraform has to start and call provider plugins to be able to produce the data needed for a plan. So before it can do that it needs to have a full list of all the plugins to call for each resource/data source.

Sure, defining that providers are needed is okay. If it can’t immediately configure a provider, why can’t it defer evaluation until apply, once it’s dependency inputs are resolved?