Recall & Review
beginner
What is the JSON configuration alternative in Terraform?
Terraform supports using JSON syntax as an alternative to its native HCL (HashiCorp Configuration Language) for writing configuration files.
Click to reveal answer
beginner
How do you name a Terraform JSON configuration file?
Terraform JSON configuration files must have the extension
.tf.json to be recognized and processed correctly.Click to reveal answer
intermediate
What is a key difference between HCL and JSON configurations in Terraform?
HCL is designed to be human-friendly and easier to read and write, while JSON is more verbose but can be generated programmatically and is widely supported.
Click to reveal answer
intermediate
Can you use comments in Terraform JSON configuration files?
No, JSON does not support comments. This is a limitation compared to HCL, which allows comments in configuration files.
Click to reveal answer
intermediate
Why might someone choose JSON over HCL for Terraform configurations?
JSON configurations can be generated automatically by tools or scripts, making them useful for dynamic or automated infrastructure setups.
Click to reveal answer
What file extension must Terraform JSON configuration files use?
✗ Incorrect
Terraform requires JSON configuration files to have the .tf.json extension to recognize them as valid configuration files.
Which of the following is NOT a feature of Terraform JSON configuration files?
✗ Incorrect
JSON does not support comments, so Terraform JSON configuration files cannot include comments.
Why might JSON be preferred over HCL in some Terraform use cases?
✗ Incorrect
JSON files can be generated automatically by scripts or tools, which is useful for automation.
Which language is Terraform's native configuration language?
✗ Incorrect
Terraform's native configuration language is HCL (HashiCorp Configuration Language).
If you want to add comments to your Terraform configuration, which format should you use?
✗ Incorrect
HCL supports comments, while JSON does not.
Explain the advantages and limitations of using JSON as an alternative configuration format in Terraform.
Think about automation benefits and readability trade-offs.
You got /5 concepts.
Describe how Terraform processes JSON configuration files compared to HCL files.
Consider file recognition, syntax differences, and output.
You got /5 concepts.