diff --git a/AWS/Terraform/main.tf b/AWS/Terraform/main.tf index 4c5de3e..1ebdc4c 100644 --- a/AWS/Terraform/main.tf +++ b/AWS/Terraform/main.tf @@ -166,7 +166,7 @@ resource "aws_instance" "logger" { ami = coalesce(var.logger_ami, data.aws_ami.logger_ami.image_id) tags = merge(var.custom-tags, map( - "Name", "${var.tag_prefix}logger" + "Name", "${var.instance_name_prefix}logger" )) subnet_id = aws_subnet.default.id @@ -230,7 +230,7 @@ resource "aws_instance" "dc" { ami = coalesce(var.dc_ami, data.aws_ami.dc_ami.image_id) tags = merge(var.custom-tags, map( - "Name", "${var.tag_prefix}dc.windomain.local" + "Name", "${var.instance_name_prefix}dc.windomain.local" )) subnet_id = aws_subnet.default.id @@ -265,7 +265,7 @@ resource "aws_instance" "wef" { ami = coalesce(var.wef_ami, data.aws_ami.wef_ami.image_id) tags = merge(var.custom-tags, map( - "Name", "${var.tag_prefix}wef.windomain.local" + "Name", "${var.instance_name_prefix}wef.windomain.local" )) subnet_id = aws_subnet.default.id @@ -300,7 +300,7 @@ resource "aws_instance" "win10" { ami = coalesce(var.win10_ami, data.aws_ami.win10_ami.image_id) tags = merge(var.custom-tags, map( - "Name", "${var.tag_prefix}win10.windomain.local" + "Name", "${var.instance_name_prefix}win10.windomain.local" )) subnet_id = aws_subnet.default.id diff --git a/AWS/Terraform/terraform.tfvars.example b/AWS/Terraform/terraform.tfvars.example index 63d8455..1f09645 100644 --- a/AWS/Terraform/terraform.tfvars.example +++ b/AWS/Terraform/terraform.tfvars.example @@ -6,5 +6,5 @@ public_key_path = "/home/user/.ssh/id_logger.pub" private_key_path = "/home/user/.ssh/id_logger" ip_whitelist = ["1.2.3.4/32"] availability_zone = "us-west-1b" -// tag_prefix = "some_prefix_" +// instance_name_prefix = "some_prefix_" // custom-tags = {"tag_name": "tag_value"} diff --git a/AWS/Terraform/variables.tf b/AWS/Terraform/variables.tf index 1ddada8..97ebde2 100644 --- a/AWS/Terraform/variables.tf +++ b/AWS/Terraform/variables.tf @@ -12,7 +12,7 @@ variable "custom-tags" { default = {} } -variable "tag_prefix" { +variable "instance_name_prefix" { description = "Optional string to prefix at the front of instance names in case you need to run multiple DetectionLab environments in the same AWS account" default = "" } @@ -120,4 +120,3 @@ variable "win10_ami" { type = string default = "" } -