Skip to content

Instantly share code, notes, and snippets.

@thedeeno
Created July 10, 2018 19:59
Show Gist options
  • Save thedeeno/6c6c4bb8233cac8b45ef1a2ac0f1c9bf to your computer and use it in GitHub Desktop.
Save thedeeno/6c6c4bb8233cac8b45ef1a2ac0f1c9bf to your computer and use it in GitHub Desktop.
can I haz foreach loop plz
variable "users" {
default = [
'dane',
'justin'
]
}
resource "aws_instance" "{{item}}" {
name = "{{item}}"
foreach = {{var.users}}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment