generated from navapbc/template-infra
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PRP-325 & PRP-324 Manage WAF and logging resources in Terraform (#103)
Ticket https://wicmtdp.atlassian.net/browse/PRP-325 https://wicmtdp.atlassian.net/browse/PRP-324 Changes added waf association resources enable load balancer logging in terraform state remove kinesis data firehose and related resources Context for reviewers Associated resources for the WAF have been manually added in the AWS console. The terraform state needs to reflect this In the console we enabled cloudwatch logs for the ALBs and the WAF in order to make debugging and querying data easier. The terraform configuration needs to reflect what’s in the console.
- Loading branch information
Showing
11 changed files
with
131 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ locals { | |
side_load_s3_name = "${local.project_name}-side-load-${var.environment_name}" | ||
contact_email = "[email protected]" | ||
staff_idp_client_domain = "${var.environment_name}-idp.wic-services.org" | ||
waf_name = "${local.project_name}-${local.project_name}-waf" | ||
} | ||
|
||
module "project_config" { | ||
|
@@ -66,6 +67,7 @@ module "participant" { | |
service_name = local.participant_service_name | ||
image_repository_url = data.aws_ecr_repository.participant_image_repository.repository_url | ||
image_repository_arn = data.aws_ecr_repository.participant_image_repository.arn | ||
waf_name = local.waf_name | ||
image_tag = var.participant_image_tag | ||
vpc_id = data.aws_vpc.default.id | ||
subnet_ids = data.aws_subnets.default.ids | ||
|
@@ -183,6 +185,7 @@ module "staff_idp" { | |
client_logout_urls = ["https://${var.staff_url}/login"] | ||
client_domain = local.staff_idp_client_domain | ||
hosted_zone_domain = "wic-services.org" | ||
waf_name = local.waf_name | ||
} | ||
|
||
module "staff_secret" { | ||
|
@@ -200,6 +203,7 @@ module "staff" { | |
source = "../../modules/service" | ||
service_name = local.staff_service_name | ||
image_repository_url = data.aws_ecr_repository.staff_image_repository.repository_url | ||
waf_name = local.waf_name | ||
image_repository_arn = data.aws_ecr_repository.staff_image_repository.arn | ||
image_tag = var.staff_image_tag | ||
vpc_id = data.aws_vpc.default.id | ||
|
@@ -267,6 +271,7 @@ module "analytics" { | |
source = "../../modules/service" | ||
service_name = local.analytics_service_name | ||
image_repository_url = data.aws_ecr_repository.analytics_image_repository.repository_url | ||
waf_name = local.waf_name | ||
image_repository_arn = data.aws_ecr_repository.analytics_image_repository.arn | ||
image_tag = var.analytics_image_tag | ||
vpc_id = data.aws_vpc.default.id | ||
|
@@ -321,7 +326,6 @@ module "analytics" { | |
|
||
module "doc_upload" { | ||
source = "../../modules/s3-encrypted" | ||
environment_name = var.environment_name | ||
s3_bucket_name = local.document_upload_s3_name | ||
read_role_names = [module.participant.task_role_name, module.staff.task_role_name] | ||
write_role_names = [module.participant.task_role_name] | ||
|
@@ -355,7 +359,6 @@ module "refresh_s3_presigned_urls" { | |
|
||
module "side_load" { | ||
source = "../../modules/s3-encrypted" | ||
environment_name = var.environment_name | ||
s3_bucket_name = local.side_load_s3_name | ||
read_role_names = [module.participant.task_role_name] | ||
admin_role_names = [module.participant.task_role_name] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ output "task_role_name" { | |
|
||
output "app_security_group" { | ||
value = aws_security_group.app | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.