HCL Syntax

Block

Block syntax

<BLOCK TYPE> "<BLOCK LABEL>" "<BLOCK LABEL>" {
  # Block body
  <IDENTIFIER> = <EXPRESSION> # Argument
}

Type of block

resource and data block

Basic syntax

# argument
image_id = "abc123"

# block
resource "aws_instance" "example" {
  ami = "abc123"
  network_interface {
    # ...
  }
}

Comment

using //

Last updated