0
0
Terraformcloud~5 mins

JSON configuration alternative in Terraform - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
A.tf
B.tf.json
C.json
D.json.tf
Which of the following is NOT a feature of Terraform JSON configuration files?
ASupport for comments
BCan be generated programmatically
CUse JSON syntax
DRecognized by Terraform CLI
Why might JSON be preferred over HCL in some Terraform use cases?
ABecause JSON files can be generated by scripts
BBecause JSON is easier for humans to read
CBecause JSON supports comments
DBecause JSON files are smaller
Which language is Terraform's native configuration language?
AYAML
BJSON
CHCL
DXML
If you want to add comments to your Terraform configuration, which format should you use?
AYAML
BJSON
CXML
DHCL
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.