This commit is contained in:
Edward Viaene
2018-06-18 09:09:55 +00:00
parent 912cb5d55a
commit 6824a885ad
2 changed files with 16 additions and 5 deletions
+15 -5
View File
@@ -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}"
}
}
+1
View File
@@ -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}"]