Skip to content

Commit 4aebec2

Browse files
committed
NRL-1385 add tags
1 parent b7bf446 commit 4aebec2

File tree

2 files changed

+10
-6
lines changed
  • terraform/account-wide-infrastructure/modules

2 files changed

+10
-6
lines changed

terraform/account-wide-infrastructure/modules/ec2/ec2.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@ resource "aws_instance" "web" {
88

99
user_data = file("./modules/web/userdata.tpl")
1010

11+
tags = {
12+
Name = "${var.naming_prefix}-ec2"
13+
}
14+
1115
}

terraform/account-wide-infrastructure/modules/vpc/vpc.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ resource "aws_vpc" "app_vpc" {
33
cidr_block = var.vpc_cidr_block
44
enable_dns_hostnames = var.enable_dns_hostnames
55

6-
tags = merge(var.common_tags, {
6+
tags = {
77
Name = "${var.name_prefix}-vpc"
8-
})
8+
}
99
}
1010

1111
# Create the internet gateway
1212
resource "aws_internet_gateway" "igw" {
1313
vpc_id = aws_vpc.app_vpc.id
1414

15-
tags = merge(var.common_tags, {
15+
tags = {
1616
Name = "${var.name_prefix}-igw"
17-
})
17+
}
1818
}
1919

2020
# Create the public subnet
@@ -24,9 +24,9 @@ resource "aws_subnet" "public_subnet" {
2424
map_public_ip_on_launch = true
2525
availability_zone = var.aws_azs
2626

27-
tags = merge(var.common_tags, {
27+
tags = {
2828
Name = "${var.name_prefix}-pubsubnet"
29-
})
29+
}
3030

3131
}
3232

0 commit comments

Comments
 (0)