DELAPARRA
Index
Color
NL
Category: Terraform

attribute

Explained by Updated

What is attribute?

attribute: A name = value assignment inside a block. Also called an argument. In Terraform, an attribute is a name = value setting inside a block, such as instance_type = "t3.micro" inside a server resource. The configuration language also calls these arguments. Resources also expose attributes you did not set, which become known after creation. An IP address or an ID assigned by the cloud provider can be referenced elsewhere, as in aws_instance.web.public_ip.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about attribute

What should you keep in mind with attribute?

Referencing attributes this way is how Terraform knows the order to create things. If a DNS record uses the server's IP, Terraform creates the server first. Prefer these references over hardcoded values. They keep your configuration correct when resources are recreated, and they make dependencies visible to anyone reading the code.

What does an example of attribute look like?

instance_type = "t3.micro"

At a glance

CategoryTerraform
Explained by
Updated

More Terraform terms

All terms starting with A

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.