configs/configupgrade: Expression type inference
configs/configupgrade: Expression type inference

Although we can't do fully-precise type inference with access only to a
single module's configuration, we can do some approximate inference using
some clues within the module along with our resource type schemas.

This depends on HCL's ability to pass through type information even if the
input values are unknown, mapping our partial input type information into
partial output type information by evaluating the same expressions.

This will allow us to do some upgrades that require dynamic analysis to
fully decide, by giving us three outcomes: needed, not needed, or unknown.
If it's unknown then that'll be our prompt to emit a warning for the user
to make a decision.

brandontosch/terraform,hashicorp/terraform,pryorda/terraform,brandontosch/terraform,gechr/terraform,pryorda/terraform,brandontosch/terraform,tommynsong/terraform,heimweh/terraform,VladRassokhin/terraform,rnaveiras/terraform,drebes/terraform,drebes/terraform,VladRassokhin/terraform,youhong316/terraform,rnaveiras/terraform,youhong316/terraform,luis-silva/terraform,brandontosch/terraform,mattray/terraform,iljaskevic/terraform,pradeepbhadani/terraform,mattray/terraform,pdecat/terraform,luis-silva/terraform,ewbankkit/terraform,apparentlymart/terraform,pdecat/terraform,pradeepbhadani/terraform,brandontosch/terraform,iljaskevic/terraform,pradeepbhadani/terraform,youhong316/terraform,nlamirault/terraform,apparentlymart/terraform,tommynsong/terraform,gechr/terraform,mattray/terraform,apparentlymart/terraform,hashicorp/terraform,apparentlymart/terraform,mattray/terraform,heimweh/terraform,heimweh/terraform,pryorda/terraform,tommynsong/terraform,heimweh/terraform,VladRassokhin/terraform,ewbankkit/terraform,apparentlymart/terraform,drebes/terraform,gechr/terraform,VladRassokhin/terraform,luis-silva/terraform,iljaskevic/terraform,luis-silva/terraform,hashicorp/terraform,iljaskevic/terraform,rnaveiras/terraform,youhong316/terraform,ewbankkit/terraform,nlamirault/terraform,drebes/terraform,pdecat/terraform,heimweh/terraform,nlamirault/terraform,ewbankkit/terraform,pdecat/terraform