New optional variable for a prefix to place in front of instance names in case someone wants to run multiple DetectionLab instances within the same AWS account so it's easier to tell instances apart which would otherwise all have the same names
This commit is contained in:
@@ -159,7 +159,7 @@ resource "aws_instance" "logger" {
|
||||
ami = coalesce(var.logger_ami, data.aws_ami.logger_ami.image_id)
|
||||
|
||||
tags = {
|
||||
Name = "logger"
|
||||
Name = "${var.tag_prefix}logger"
|
||||
}
|
||||
|
||||
subnet_id = aws_subnet.default.id
|
||||
@@ -223,7 +223,7 @@ resource "aws_instance" "dc" {
|
||||
ami = coalesce(var.dc_ami, data.aws_ami.dc_ami.image_id)
|
||||
|
||||
tags = {
|
||||
Name = "dc.windomain.local"
|
||||
Name = "${var.tag_prefix}dc.windomain.local"
|
||||
}
|
||||
|
||||
subnet_id = aws_subnet.default.id
|
||||
@@ -258,7 +258,7 @@ resource "aws_instance" "wef" {
|
||||
ami = coalesce(var.wef_ami, data.aws_ami.wef_ami.image_id)
|
||||
|
||||
tags = {
|
||||
Name = "wef.windomain.local"
|
||||
Name = "${var.tag_prefix}wef.windomain.local"
|
||||
}
|
||||
|
||||
subnet_id = aws_subnet.default.id
|
||||
@@ -293,7 +293,7 @@ resource "aws_instance" "win10" {
|
||||
ami = coalesce(var.win10_ami, data.aws_ami.win10_ami.image_id)
|
||||
|
||||
tags = {
|
||||
Name = "win10.windomain.local"
|
||||
Name = "${var.tag_prefix}win10.windomain.local"
|
||||
}
|
||||
|
||||
subnet_id = aws_subnet.default.id
|
||||
@@ -304,4 +304,3 @@ resource "aws_instance" "win10" {
|
||||
delete_on_termination = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user