From 6824a885ade9b223843cc0a47c4b61b651153638 Mon Sep 17 00:00:00 2001 From: Edward Viaene Date: Mon, 18 Jun 2018 09:09:55 +0000 Subject: [PATCH] fmt --- demo-18b/modules/instances/instance.tf | 20 +++++++++++++++----- demo-18b/modules/vpc/vpc.tf | 1 + 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/demo-18b/modules/instances/instance.tf b/demo-18b/modules/instances/instance.tf index 646ab30..e2b9f8c 100644 --- a/demo-18b/modules/instances/instance.tf +++ b/demo-18b/modules/instances/instance.tf @@ -1,8 +1,18 @@ variable "ENV" {} -variable "INSTANCE_TYPE" { default = "t2.micro" } -variable "PUBLIC_SUBNETS" { type = "list" } + +variable "INSTANCE_TYPE" { + default = "t2.micro" +} + +variable "PUBLIC_SUBNETS" { + type = "list" +} + variable "VPC_ID" {} -variable "PATH_TO_PUBLIC_KEY" { default = "mykey.pub" } + +variable "PATH_TO_PUBLIC_KEY" { + default = "mykey.pub" +} data "aws_ami" "ubuntu" { most_recent = true @@ -34,7 +44,7 @@ resource "aws_instance" "instance" { key_name = "${aws_key_pair.mykeypair.key_name}" tags { - Name = "instance-${var.ENV}" + Name = "instance-${var.ENV}" Environmnent = "${var.ENV}" } } @@ -59,7 +69,7 @@ resource "aws_security_group" "allow-ssh" { } tags { - Name = "allow-ssh" + Name = "allow-ssh" Environmnent = "${var.ENV}" } } diff --git a/demo-18b/modules/vpc/vpc.tf b/demo-18b/modules/vpc/vpc.tf index 39cd914..6b41839 100644 --- a/demo-18b/modules/vpc/vpc.tf +++ b/demo-18b/modules/vpc/vpc.tf @@ -24,6 +24,7 @@ output "vpc_id" { description = "The ID of the VPC" value = "${module.main-vpc.vpc_id}" } + output "private_subnets" { description = "List of IDs of private subnets" value = ["${module.main-vpc.private_subnets}"]