@@ -11,7 +11,7 @@ data "aws_ssm_parameter" "virus_scanning_subnet_cidr_range" {
1111 name = " /prs/virus-scanner/subnet-cidr-range"
1212}
1313
14- resource "aws_subnet" "virus_scanning_subnet1 " {
14+ resource "aws_subnet" "virus_scanning_a " {
1515 count = local. is_production ? 1 : 0
1616
1717 availability_zone = " eu-west-2a"
@@ -25,7 +25,7 @@ resource "aws_subnet" "virus_scanning_subnet1" {
2525 }
2626}
2727
28- resource "aws_subnet" "virus_scanning_subnet2 " {
28+ resource "aws_subnet" "virus_scanning_b " {
2929 count = local. is_production ? 1 : 0
3030
3131 availability_zone = " eu-west-2b"
@@ -39,7 +39,7 @@ resource "aws_subnet" "virus_scanning_subnet2" {
3939 }
4040}
4141
42- resource "aws_route_table" "virus_scanning_route_table " {
42+ resource "aws_route_table" "virus_scanning " {
4343 count = local. is_production ? 1 : 0
4444
4545 vpc_id = module. ndr-vpc-ui . vpc_id
@@ -56,18 +56,18 @@ resource "aws_route_table" "virus_scanning_route_table" {
5656 }
5757}
5858
59- resource "aws_route_table_association" "virus_scanning_subnet1_route_table_association " {
59+ resource "aws_route_table_association" "virus_scanning_a " {
6060 count = local. is_production ? 1 : 0
6161
62- subnet_id = aws_subnet. virus_scanning_subnet1 [0 ]. id
63- route_table_id = aws_route_table. virus_scanning_route_table [0 ]. id
62+ subnet_id = aws_subnet. virus_scanning_a [0 ]. id
63+ route_table_id = aws_route_table. virus_scanning [0 ]. id
6464}
6565
66- resource "aws_route_table_association" "virus_scanning_subnet2_route_table_association " {
66+ resource "aws_route_table_association" "virus_scanning_b " {
6767 count = local. is_production ? 1 : 0
6868
69- subnet_id = aws_subnet. virus_scanning_subnet2 [0 ]. id
70- route_table_id = aws_route_table. virus_scanning_route_table [0 ]. id
69+ subnet_id = aws_subnet. virus_scanning_b [0 ]. id
70+ route_table_id = aws_route_table. virus_scanning [0 ]. id
7171}
7272
7373module "cloud_storage_security" {
@@ -77,8 +77,8 @@ module "cloud_storage_security" {
7777 version = " 1.7.1+css8.07.002"
7878 cidr = [var . cloud_security_console_black_hole_address ] # This is a reserved address that does not lead anywhere to make sure CloudStorageSecurity console is not available
7979 email = data. aws_ssm_parameter . cloud_security_admin_email . value
80- subnet_a_id = aws_subnet. virus_scanning_subnet1 [0 ]. id
81- subnet_b_id = aws_subnet. virus_scanning_subnet2 [0 ]. id
80+ subnet_a_id = aws_subnet. virus_scanning_a [0 ]. id
81+ subnet_b_id = aws_subnet. virus_scanning_b [0 ]. id
8282 vpc = module. ndr-vpc-ui . vpc_id
8383 min_running_agents = 0
8484 allow_access_to_all_kms_keys = false
@@ -91,15 +91,15 @@ module "cloud_storage_security" {
9191 }
9292}
9393
94- resource "aws_ssm_parameter" "virus_scan_notifications_sns_topic_arn " {
94+ resource "aws_ssm_parameter" "virus_scanning_notifications_sns_topic_arn " {
9595 count = local. is_production ? 1 : 0
9696
9797 name = " /prs/${ var . environment } /virus-scan-notifications-sns-topic-arn"
9898 type = " String"
9999 value = module. cloud_storage_security [0 ]. proactive_notifications_topic_arn
100100}
101101
102- resource "aws_sns_topic_subscription" "proactive_notifications_sns_topic_subscription " {
102+ resource "aws_sns_topic_subscription" "proactive_virus_scanning_notifications " {
103103 for_each = local. is_production ? toset (nonsensitive (split (" ," , data. aws_ssm_parameter . cloud_security_notification_email_list . value ))) : []
104104 endpoint = each. value
105105 protocol = " email"
0 commit comments