AMI changes to reflect latest HVM and instance type changes to t2.micro

This commit is contained in:
Sathiya Shunmugasundaram 2015-06-02 15:54:08 -04:00
parent ae974bc824
commit 0b681edb6c
2 changed files with 6 additions and 7 deletions

View File

@ -1,6 +1,6 @@
resource "aws_instance" "server" { resource "aws_instance" "server" {
ami = "${lookup(var.ami, concat(var.region, "-", var.platform))}" ami = "${lookup(var.ami, concat(var.region, "-", var.platform))}"
instance_type = "${lookup(var.instance_type, var.platform)}" instance_type = "${var.instance_type}"
key_name = "${var.key_name}" key_name = "${var.key_name}"
count = "${var.servers}" count = "${var.servers}"
security_groups = ["${aws_security_group.consul.name}"] security_groups = ["${aws_security_group.consul.name}"]

View File

@ -11,9 +11,10 @@ variable "user" {
} }
variable "ami" { variable "ami" {
description = "AWS AMI Id, if you change, make sure it is compatible with insatnce type, not all AMIs allow all insatnce types "
default = { default = {
us-east-1-ubuntu = "ami-3acc7a52" us-east-1-ubuntu = "ami-83c525e8"
us-west-2-ubuntu = "ami-37501207" us-west-2-ubuntu = "ami-57e8d767"
us-east-1-rhel6 = "ami-b0fed2d8" us-east-1-rhel6 = "ami-b0fed2d8"
us-west-2-rhel6 = "ami-2faa861f" us-west-2-rhel6 = "ami-2faa861f"
} }
@ -38,10 +39,8 @@ variable "servers" {
} }
variable "instance_type" { variable "instance_type" {
default = { default = "t2.micro"
ubuntu = "m1.small" description = "AWS Instance type, if you change, make sure it is compatible with AMI, not all AMIs allow all insatnce types "
rhel6 = "m3.medium"
}
} }
variable "tagName" { variable "tagName" {