From 136b075a4662c55130467c95c5c8287e5b778023 Mon Sep 17 00:00:00 2001 From: aloftus23 Date: Mon, 10 Feb 2025 10:30:31 -0500 Subject: [PATCH 1/2] Fix backend domain parameter creation in the terraform --- backend/src/api/functions.yml | 22 +++++++++++----------- infrastructure/main.tf | 26 +++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/backend/src/api/functions.yml b/backend/src/api/functions.yml index a185b2526..f95e2757b 100644 --- a/backend/src/api/functions.yml +++ b/backend/src/api/functions.yml @@ -1,13 +1,13 @@ --- api: - handler: src.xfd_django.xfd_django.asgi.handler - events: - - http: - path: / # this matches the base path - method: ANY - cors: true - - http: - # this matches any path, the token 'any' doesn't mean anything special - path: /{any+} - method: ANY - cors: true + handler: src.xfd_django.xfd_django.asgi.handler + events: + - http: + path: / # this matches the base path + method: ANY + cors: true + - http: + # this matches any path, the token 'any' doesn't mean anything special + path: /{any+} + method: ANY + cors: true diff --git a/infrastructure/main.tf b/infrastructure/main.tf index f33af3b89..077753636 100644 --- a/infrastructure/main.tf +++ b/infrastructure/main.tf @@ -17,7 +17,31 @@ resource "aws_ssm_parameter" "prod_api_domain" { resource "aws_ssm_parameter" "stage_api_domain" { name = "/crossfeed/staging/DOMAIN" type = "String" - value = var.api_domain + value = "api.staging.crossfeed.cyber.dhs.gov" + overwrite = true + + tags = { + Project = var.project + Owner = "Crossfeed managed resource" + } +} + +resource "aws_ssm_parameter" "stage_cd_api_domain" { + name = "/crossfeed/staging/DOMAIN" + type = "String" + value = "api.staging-cd.crossfeed.cyber.dhs.gov" + overwrite = true + + tags = { + Project = var.project + Owner = "Crossfeed managed resource" + } +} + +resource "aws_ssm_parameter" "integration_api_domain" { + name = "/crossfeed/integration/DOMAIN" + type = "String" + value = "api.integration.crossfeed.cyber.dhs.gov" overwrite = true tags = { From b69af535623b4dae60fe59dbad5ed6c3ac1fc032 Mon Sep 17 00:00:00 2001 From: aloftus23 Date: Mon, 10 Feb 2025 10:40:34 -0500 Subject: [PATCH 2/2] Fix lint --- backend/src/api/functions.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/backend/src/api/functions.yml b/backend/src/api/functions.yml index f95e2757b..a185b2526 100644 --- a/backend/src/api/functions.yml +++ b/backend/src/api/functions.yml @@ -1,13 +1,13 @@ --- api: - handler: src.xfd_django.xfd_django.asgi.handler - events: - - http: - path: / # this matches the base path - method: ANY - cors: true - - http: - # this matches any path, the token 'any' doesn't mean anything special - path: /{any+} - method: ANY - cors: true + handler: src.xfd_django.xfd_django.asgi.handler + events: + - http: + path: / # this matches the base path + method: ANY + cors: true + - http: + # this matches any path, the token 'any' doesn't mean anything special + path: /{any+} + method: ANY + cors: true