Skip to content

Instantly share code, notes, and snippets.

@clstokes
Created May 18, 2015 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clstokes/5a107c30f88eac4057de to your computer and use it in GitHub Desktop.
Save clstokes/5a107c30f88eac4057de to your computer and use it in GitHub Desktop.
terraform variables and split function
variable "subnet_cidr_blocks" {
default = "192.168.0.0/24,192.168.1.0/24,192.168.2.0/24"
}
resource "aws_subnet" "subnet_public" {
cidr_block = "${split(",",var.subnet_cidr_blocks)}"
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment