Skip to content

Commit fe65d9a

Browse files
committed
Tweaks
1 parent c8ef7be commit fe65d9a

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

infra/app/service/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ module "service" {
6969
domain_name = module.domain.domain_name
7070
hosted_zone_id = module.domain.hosted_zone_id
7171
certificate_arn = module.domain.certificate_arn
72-
enable_waf = module.app_config.enable_waf
72+
73+
enable_waf = module.app_config.enable_waf
7374

7475
cpu = local.service_config.cpu
7576
memory = local.service_config.memory

infra/modules/network/data/main.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,9 @@ data "aws_security_groups" "aws_services" {
4242
values = [data.aws_vpc.network.id]
4343
}
4444
}
45+
46+
data "aws_wafv2_web_acl" "network" {
47+
name = module.interface.waf_acl_name
48+
scope = "REGIONAL"
49+
}
50+

infra/modules/network/data/outputs.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ output "vpc_id" {
2222
value = data.aws_vpc.network.id
2323
}
2424

25-
data "aws_wafv2_web_acl" "network" {
26-
name = module.interface.waf_acl_name
27-
scope = "REGIONAL"
28-
}
29-
3025
output "waf_arn" {
3126
value = data.aws_wafv2_web_acl.network.arn
3227
}

infra/modules/service/variables.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ variable "enable_command_execution" {
5151
description = "Whether the service should enable ECS Exec, such as for debugging"
5252
}
5353

54+
variable "enable_waf" {
55+
type = bool
56+
description = "Whether to enable WAF protection for the load balancer"
57+
default = false
58+
}
59+
5460
variable "extra_environment_variables" {
5561
type = map(string)
5662
description = "Additional environment variables to pass to the service container. Map from environment variable name to the value."
@@ -166,9 +172,3 @@ variable "ephemeral_write_volumes" {
166172
description = "A set of absolute paths in the container to be mounted as writable for the life of the task. These need to be declared with `VOLUME` instructions in the container build file."
167173
default = []
168174
}
169-
170-
variable "enable_waf" {
171-
type = bool
172-
description = "Whether to enable WAF protection for the load balancer"
173-
default = false
174-
}

0 commit comments

Comments
 (0)