TA-002-P · Question #296
While Terraform is generally written using the HashiCorp Configuration Language (HCL), what other syntax can Terraform are expressed in?
The correct answer is A. JSON. Terraform natively supports two configuration syntaxes: HashiCorp Configuration Language (HCL), which uses the .tf file extension, and JSON, which uses the .tf.json extension. JSON support exists primarily for machine-generated configurations and tool interoperability. YAML (B)…
Question
While Terraform is generally written using the HashiCorp Configuration Language (HCL), what other syntax can Terraform are expressed in?
Options
- AJSON
- BYAML
- CTypeScript
- DXML
How the community answered
(48 responses)- A94% (45)
- B2% (1)
- C4% (2)
Explanation
Terraform natively supports two configuration syntaxes: HashiCorp Configuration Language (HCL), which uses the .tf file extension, and JSON, which uses the .tf.json extension. JSON support exists primarily for machine-generated configurations and tool interoperability. YAML (B) is used by tools like Kubernetes and Ansible but is not a native Terraform format. TypeScript (C) is used by the CDK for Terraform (CDKTF) as a higher-level abstraction, but CDKTF synthesizes down to JSON - it is not a native Terraform syntax. XML (D) is not supported by Terraform.
Topics
Community Discussion
No community discussion yet for this question.