Attribute

Attributes are used in blocks to configure behavior. An attribute has a name and is bound to an expression which in turn is evaluated to the expected value.

# this is an attribute initialized with a list of string
dependencies = [ "../project1"
                 "../project2" ]

# this attribute initialize specific dependencies
depends_on = [ target.build
               target.init ]

# this is an attribute initialized with a mapping
defaults = {
    arguments: { version: var.configuration }
    image: "ghcr.io/example/" + terrabuild.project
}
Last updated on