You can use terraform formatlist() function to format a list in terraform.
Open terraform console
1 2 |
## Open terraform console terraform console |
Format a list in terraform
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
## Format a list in terraform formatlist("%s Cloud",["AWS","GCP","Azure"]) ## returns ## [ ## "AWS Cloud", ## "GCP Cloud", ## "Azure Cloud", ## ] formatlist("10.0.0.0/%d",[32,16,8]) ## returns ## [ ## "10.0.0.0/32", ## "10.0.0.0/16", ## "10.0.0.0/8", ## ] |