|
@@ -1,5 +1,5 @@
|
|
|
locals {
|
|
|
- instance_name = "resolver-${var.aws_partition_alias}"
|
|
|
+ instance_name = "resolver-${var.aws_partition_alias}-${var.instance_number}"
|
|
|
}
|
|
|
|
|
|
# Rather than pass in the aws security group, we just look it up. This will
|
|
@@ -87,7 +87,7 @@ data "template_file" "cloud-init" {
|
|
|
|
|
|
vars = {
|
|
|
hostname = local.instance_name
|
|
|
- fqdn = "resolver-${var.aws_partition_alias}.${var.dns_info["private"]["zone"]}"
|
|
|
+ fqdn = "resolver-${var.aws_partition_alias}-${var.instance_number}.${var.dns_info["private"]["zone"]}"
|
|
|
environment = var.environment
|
|
|
# can't use the DNS name like we would most places, because this is the DNS server
|
|
|
saltmaster = var.salt_master_ip
|
|
@@ -119,7 +119,7 @@ data "template_cloudinit_config" "cloud-init" {
|
|
|
}
|
|
|
|
|
|
resource "aws_security_group" "dns_security_group" {
|
|
|
- name = "dns_security_group"
|
|
|
+ name = "dns_security_group_${var.instance_number}"
|
|
|
description = "DNS Security Group"
|
|
|
vpc_id = var.vpc_id
|
|
|
tags = merge(var.standard_tags, var.tags)
|