Terraform function: toset
Jump to navigation
Jump to search
- https://www.terraform.io/docs/language/functions/toset.html Pass a list value to
tosetto convert it to aset, which will remove any duplicate elements and discard the ordering of the elements.
resource "aws_ssm_parameter" "secret" { for_each = toset(var.secrets) name = each.key description = each.key type = "SecureString" value = "1" lifecycle { ignore_changes = [value] } }
Related[edit]
See also[edit]
- Terraform functions, Terraform collection functions:
tolist,toset,length,sum,file,join,depends_on,zipmap,replace,lookup,read files,concat,merge, templatefile, for_each, format, element, slice, try, filebase64, upper, filemd5, coalesce, formatlist, flatten, sensitive, tonumber, jsondecode, yamldecode, pathexpand
Advertising: