diff --git a/terraform/aws/consul.tf b/terraform/aws/consul.tf index 3ed0414c2..9a2c5fcf7 100644 --- a/terraform/aws/consul.tf +++ b/terraform/aws/consul.tf @@ -10,6 +10,11 @@ resource "aws_instance" "server" { key_file = "${var.key_path}" } + #Instance tags + tags { + Name = "${var.tagName}-${count.index}" + } + provisioner "file" { source = "${path.module}/scripts/upstart.conf" destination = "/tmp/upstart.conf" diff --git a/terraform/aws/variables.tf b/terraform/aws/variables.tf index 35d16d7ad..2d92711f6 100644 --- a/terraform/aws/variables.tf +++ b/terraform/aws/variables.tf @@ -26,4 +26,8 @@ variable "servers" { variable "instance_type" { default = "m1.small" description = "The instance type to launch." +} +variable "tagName" { + default = "consul" + description = "Name tag for the servers" } \ No newline at end of file