mirror of https://github.com/status-im/consul.git
Add Terraform Variable for AWS instance type
Details: * Adds an input variable to the consul terraform template module to allow a user of the module to specify a different AWS instance type to launch. * The default is still "m1.small". * The module input variable is named "instance_type".
This commit is contained in:
parent
d969655cfa
commit
4c0ecc3b6f
|
@ -1,6 +1,6 @@
|
||||||
resource "aws_instance" "server" {
|
resource "aws_instance" "server" {
|
||||||
ami = "${lookup(var.ami, var.region)}"
|
ami = "${lookup(var.ami, var.region)}"
|
||||||
instance_type = "m1.small"
|
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}"]
|
||||||
|
|
|
@ -22,3 +22,8 @@ variable "servers" {
|
||||||
default = "3"
|
default = "3"
|
||||||
description = "The number of Consul servers to launch."
|
description = "The number of Consul servers to launch."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "instance_type" {
|
||||||
|
default = "m1.small"
|
||||||
|
description = "The instance type to launch."
|
||||||
|
}
|
Loading…
Reference in New Issue