Last active
February 12, 2016 18:46
-
-
Save conorgil/4b3dacf566efaf40017c to your computer and use it in GitHub Desktop.
Example terraform output using a module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Call the module | |
module "vpc" { | |
source = "../modules/foo/bar/baz" | |
environment_name = "${var.environment_name}" | |
vpc_cidr = "${var.vpc_cidr}" | |
vpc_instance_tenancy = "dedicated" | |
vpc_enable_dns_support = true | |
vpc_enable_dns_hostnames = true | |
zones = "${var.zones}" | |
public_subnet_cidrs = "${var.public_subnet_cidrs}" | |
private_subnet_cidrs = "${var.private_subnet_cidrs}" | |
} | |
# Define outputs for this main.tf file. | |
# Note that if we want to output values from the vpc module | |
# call, then we need to define those explicitly | |
output "public_subnet_ids" { | |
value = "${module.vpc.public_subnet_ids}" | |
} | |
output "private_subnet_ids" { | |
value = "${module.vpc.private_subnet_ids}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment