HCL argument
A name, an equals sign and an expression inside a block, such as filename = "hello.txt", which sets one value.
In more detail
Which arguments a resource accepts, which are required and what they mean is decided by the provider, so the registry documentation is the reference. Arguments never nest inside other arguments, and terraform fmt lines up the equals signs of neighbouring ones.
Example
filename = "hello.txt"Related terms
- HCL — HashiCorp Configuration Language: the block-based configuration syntax of Terraform files, which end in .tf.
- HCL block — A container in HCL written as a type, optional quoted labels and a body in braces, such as resource "local_file" "greeting" { }.
- Terraform expression — Anything that produces a value on the right of an equals sign: a literal, a reference, a function call, a for expression or a conditional.
Taught in
- Writing Your First Configuration In HCL — Infrastructure as Code with Terraform
- Functions And Expressions In HCL — Infrastructure as Code with Terraform
- The Plan That Wanted To Destroy Production — HashiCorp Terraform Associate (004) Exam Prep
- One Hour, No Weights Published — HashiCorp Terraform Associate (004) Exam Prep
- Infrastructure As Code, And One Workflow For Every Platform — HashiCorp Terraform Associate (004) Exam Prep
- Providers: How Terraform Reaches Every API — HashiCorp Terraform Associate (004) Exam Prep
- Versions, The Lock File And Provider Aliases — HashiCorp Terraform Associate (004) Exam Prep
- Reading A Plan, Saving It, Applying It — HashiCorp Terraform Associate (004) Exam Prep
- Validate, Format, Destroy, And The Flags That Bend A Plan — HashiCorp Terraform Associate (004) Exam Prep
- Resources, Data Sources And The References Between Them — HashiCorp Terraform Associate (004) Exam Prep