From b4ba3fc2e9702f0c8cf17530d5c211f84fdabe79 Mon Sep 17 00:00:00 2001 From: Lauren TB <162153408+laurentb4@users.noreply.github.com> Date: Thu, 19 Dec 2024 10:13:03 +0000 Subject: [PATCH] moved cognito screts from background worker (#345) --- modules/admin/ecs.tf | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/modules/admin/ecs.tf b/modules/admin/ecs.tf index 10df04c..ad5bdc9 100644 --- a/modules/admin/ecs.tf +++ b/modules/admin/ecs.tf @@ -257,22 +257,11 @@ resource "aws_ecs_task_definition" "admin_background_worker" { },{ "name": "RAILS_SERVE_STATIC_FILES", "value": "1" - },{ - "name": "COGNITO_CLIENT_ID", - "value": "${var.cognito_user_pool_client_id}" - }, - { - "name": "COGNITO_CLIENT_SECRET", - "value": "${var.cognito_user_pool_client_secret}" }, { "name": "COGNITO_USER_POOL_SITE", "value": "https://${var.cognito_user_pool_domain}.auth.${var.region}.amazoncognito.com" }, - { - "name": "COGNITO_USER_POOL_ID", - "value": "${var.cognito_user_pool_id}" - }, { "name": "RADIUS_CLUSTER_NAME", "value": "${var.radius_cluster_name}" @@ -310,6 +299,18 @@ resource "aws_ecs_task_definition" "admin_background_worker" { { "name": "SENTRY_DSN", "valueFrom": "${var.secret_arns["moj_network_access_control_env_admin_sentry_dsn"]}" + }, + { + "name": "COGNITO_USER_POOL_ID", + "valueFrom": "${var.secret_arns["moj_network_access_control_env_cognito_userpool_id"]}" + }, + { + "name": "COGNITO_CLIENT_SECRET", + "valueFrom": "${var.secret_arns["moj_network_access_control_env_cognito_client_secret"]}" + }, + { + "name": "COGNITO_CLIENT_ID", + "valueFrom": "${var.secret_arns["moj_network_access_control_env_cognito_client_id"]}" } ], "image": "${aws_ecr_repository.admin.repository_url}",