Hey David,
The state file contains a snapshot of the world view of Terraform, where the TF files themselves
are the desired state. Inside the TF file, attributes of resources may be specified as a constant,
a variable, interpolation, or allowed to be computed. But once the state file is created that information
is lost and only the value is retained. For example an instance will have a “vpc_id” but there is no sane way
to reverse from that how it was populated.
It would be possible to generate TF config from a state file, but it would be a very lossy transformation.
Best Regards,
Armon Dadgar