Terraform syntax

From wikinotes
Revision as of 15:24, 25 September 2022 by Will (talk | contribs) (Created page with "Terraform files use the extension <code>*.tf</code> = Documentation = <blockquote> {| class="wikitable" |- | terraform language || https://www.terraform.io/language |- |} </blockquote><!-- Documentation --> = Basics = <blockquote> * '''blocks''' contain configuration for an object using a key/value format * blocks can optionally be assigned a variable number of '''labels''' * key-value assignments within a block are referred to as '''arguments''' <syntaxhighlight lang...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Terraform files use the extension *.tf

Documentation

terraform language https://www.terraform.io/language

Basics

  • blocks contain configuration for an object using a key/value format
  • blocks can optionally be assigned a variable number of labels
  • key-value assignments within a block are referred to as arguments
# ${BLOCK_TYPE} [${LABEL}..] {
#   ${IDENTIFIER} = ${EXPRESSION}  # argument
# }

resource "aws_vpc" "main" {
  cidr_block = var.base_cidr_block
}