nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · Question #195

What is the Terraform style convention for indenting a nesting level compared to the one above it?

The correct answer is A. With two spaces. Terraform's Indentation Standards: Terraform's style convention uses two spaces per nesting level for readability, helping to maintain uniform code across teams. Configuration Files: Consistent indentation is crucial for Terraform's HCL syntax, as it improves readability and…

Submitted by rohit_dlh· Apr 18, 2026Understand Terraform Basics

Question

What is the Terraform style convention for indenting a nesting level compared to the one above it?

Options

  • AWith two spaces.
  • BWith four spaces.
  • CWith three spaces.
  • DWith a tab.

How the community answered

(53 responses)
  • A
    94% (50)
  • B
    2% (1)
  • D
    4% (2)

Explanation

Terraform's Indentation Standards: Terraform's style convention uses two spaces per nesting level for readability, helping to maintain uniform code across teams. Configuration Files: Consistent indentation is crucial for Terraform's HCL syntax, as it improves readability and avoids parsing issues.

Topics

#Terraform Style Guide#HCL Indentation#Code Formatting#terraform fmt

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice