Skip to content

Instantly share code, notes, and snippets.

@vjanelle
Created April 13, 2016 19:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vjanelle/a399044a1d853b581a70761e42c71821 to your computer and use it in GitHub Desktop.
Save vjanelle/a399044a1d853b581a70761e42c71821 to your computer and use it in GitHub Desktop.
resource "null_resource" "subnets" {
triggers {
subnets = "${var.private_subnets.us-west-2a},${var.private_subnets.us-west-2b},${var.private_subnets.us-west-2c}"
}
}
resource "aws_elasticache_subnet_group" "elasticache" {
name = "${var.name}-${var.envtag}"
description = "${var.name} subnet group for ${var.envtag}"
subnet_ids = [ "${compact("${split(",","${null_resource.subnets.triggers.subnets}")}")}" ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment