resource reference

An expression such as aws_vpc.main.id that reads a value from another block by its address.

In more detail

A reference is how one block uses another's value, and it also tells Terraform that the second must be created after the first. You never write the order yourself; references are the order.

Example

vpc_id = aws_vpc.main.id

Related terms

Taught in

References

Certification courses