merge()

The function that combines several maps into one, with keys in later maps winning over earlier ones.

In more detail

The usual pattern is merge(var.tags, { ManagedBy = "terraform" }): the caller's tags plus the ones the configuration insists on. Put the values that must win last.

Example

tags = merge(var.tags, { ManagedBy = "terraform" })

Related terms

Taught in

References