Terraform lookup function
Jump to navigation
Jump to search
Terraform lookup function retrieves the value of a single element from a map
, given its key.
lookup(map, key, default)
Examples
variable "candy_list" { type = list(string) default = ["snickers", "kitkat", "reeces", "m&ms"] } output "give_me_candy" { value = "${lookup(var.candy_list, 2)}" }
Related
See also
Advertising: