Skip to content

Instantly share code, notes, and snippets.

@khaliqgant
Created March 29, 2022 11:49
Show Gist options
  • Save khaliqgant/75fa6c1281351b169b2de0090a9d8cfc to your computer and use it in GitHub Desktop.
Save khaliqgant/75fa6c1281351b169b2de0090a9d8cfc to your computer and use it in GitHub Desktop.
[Terraform Merge] Merge Tags #terraform #infrastructure
tags = merge(
{
"Name" = var.instance_count > 1 || var.use_num_suffix ? format("%s${var.num_suffix_format}", var.name, count.index + 1) : var.name
},
var.tags,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment