Skip to content

Commit f02668d

Browse files
committed
fix for 0.3.7
1 parent 8dda436 commit f02668d

File tree

4 files changed

+17
-21
lines changed

4 files changed

+17
-21
lines changed

az/main.tf

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,10 @@ locals {
4242
nat_gateways_not_enabled_check = "${var.nat_gateways_enabled != "true" ? 1 : 0}"
4343

4444
# default subnet tags
45-
default_subnet_tags = [
46-
{
47-
application = "${var.stack_item_fullname}"
48-
managed_by = "terraform"
49-
},
50-
]
45+
default_subnet_tags = {
46+
application = "${var.stack_item_fullname}"
47+
managed_by = "terraform"
48+
}
5149
}
5250

5351
## Provisions DMZ resources
@@ -69,7 +67,7 @@ resource "aws_subnet" "dmz" {
6967
map_public_ip_on_launch = "${var.enable_dmz_public_ips}"
7068
vpc_id = "${var.vpc_id}"
7169

72-
tags = "${concat(local.default_subnet_tags, var.additional_subnet_tags, list(map("Name", "${var.stack_item_label}-dmz-${count.index}")))}"
70+
tags = "${merge(local.default_subnet_tags, var.additional_subnet_tags, map("Name", "${var.stack_item_label}-dmz-${count.index}"))}"
7371
}
7472

7573
### Associates subnet with routing table
@@ -193,7 +191,7 @@ resource "aws_subnet" "lan" {
193191
cidr_block = "${local.lan_cidrs_override_enabled == "true" ? element(var.lan_cidrs_override,count.index) : cidrsubnet(data.aws_vpc.base.cidr_block,lookup(var.az_cidrsubnet_newbits, local.azs_provisioned_count * local.lans_multiplier),count.index + lookup(var.az_cidrsubnet_offset, local.azs_provisioned_count))}"
194192
vpc_id = "${var.vpc_id}"
195193

196-
tags = "${concat(local.default_subnet_tags, var.additional_subnet_tags, list(map("Name", "${var.stack_item_label}-lan-${count.index}")))}"
194+
tags = "${merge(local.default_subnet_tags, var.additional_subnet_tags, map("Name", "${var.stack_item_label}-lan-${count.index}"))}"
197195
}
198196

199197
### Provisions routing table

az/variables.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ variable "stack_item_label" {
1414
}
1515

1616
variable "additional_subnet_tags" {
17-
type = "list"
18-
description = "Additional subnet to apply at the subnet level, if any"
19-
default = []
17+
type = "map"
18+
description = "Additional tags to apply at the subnet level, if any"
19+
default = {}
2020
}
2121

2222
## VPC parameters

base/main.tf

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@ terraform {
99
locals {
1010
default_instance_tenancy = "${length(var.instance_tenancy) >= 1 ? "${var.instance_tenancy}" : "default"}"
1111

12-
default_vpc_tags = [
13-
{
14-
application = "${var.stack_item_fullname}"
15-
managed_by = "terraform"
16-
Name = "${var.stack_item_label}-vpc"
17-
},
18-
]
12+
default_vpc_tags = {
13+
application = "${var.stack_item_fullname}"
14+
managed_by = "terraform"
15+
Name = "${var.stack_item_label}-vpc"
16+
}
1917
}
2018

2119
## Provisions Virtual Private Cloud (VPC)
@@ -28,7 +26,7 @@ resource "aws_vpc" "vpc" {
2826
enable_classiclink_dns_support = "${var.enable_classiclink_dns_support}"
2927
assign_generated_ipv6_cidr_block = "${var.assign_generated_ipv6_cidr_block}"
3028

31-
tags = "${concat(local.default_vpc_tags, var.additional_vpc_tags)}"
29+
tags = "${merge(local.default_vpc_tags, var.additional_vpc_tags)}"
3230
}
3331

3432
## Provisions Internet gateways

base/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ variable "stack_item_label" {
1414
}
1515

1616
variable "additional_vpc_tags" {
17-
type = "list"
17+
type = "map"
1818
description = "Additional tags to apply at the VPC level, if any"
19-
default = []
19+
default = {}
2020
}
2121

2222
## VPC parameters

0 commit comments

Comments
 (0)