Skip to content

Instantly share code, notes, and snippets.

@mlrobinson
Created January 6, 2016 19:29
Show Gist options
  • Save mlrobinson/bf4cd64fbbe9835ba8ac to your computer and use it in GitHub Desktop.
Save mlrobinson/bf4cd64fbbe9835ba8ac to your computer and use it in GitHub Desktop.
Example Lookup Module
variable "vpc_id" {
description = "VPC ID to create the subnet in"
}
# Just setup multiple of these as needed
variable "sec_internal_admin" {
description = "The security group ID for the internal admin group"
default {
vpc-blahblah = "sg-deadbeef"
vpc-etcetcet = "sg-00000001"
}
}
# Just setup multiple of these as needed
output "sec_internal_admin_id" {
value = "${lookup(var.sec_internal_admin, var.vpc_id)}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment