3 ms·
Are all variables, conditionals, templating, and loops done in Python? Or is some of that still needed on the Terraform side?
by justin_oaks 6y ago
Are all variables, conditionals, templating, and loops done in Python? Or is some of that still needed on the Terraform side?
- diroussel 6y agoBasically you create the desired state DAG in procedural code, rather than the TF DSL. Blithe diffing and applying are the same.
- ben0x539 6y agoCan you inspect inputs from terraform resource attributes or data sources in the procedural evaluation?
- cmclaughlin 6y ago> Can you inspect inputs from terraform resource attributes or data sources in the procedural evaluation? No... the high level programming language really just serves as a bridge or translation layer to a Terraform compatible JSON file. Those sorts of evaluations don’t happen to the actually plan/apply. However, you may find it useful to make direct API calls to your cloud provider in cdktf stacks. For instance, I mostly use data lookups but if I want to perform string operations on that sort of data I would use boto3 instead.