More descriptive name for one of the new optional variables
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"}
|
||||
|
||||
@@ -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 = ""
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user