From dadf46bb210597688ef17469369f693c70e7885f Mon Sep 17 00:00:00 2001 From: Thomas Loubrieu Date: Fri, 28 Aug 2026 14:37:37 +0000 Subject: [PATCH 1/3] actual code used for latest deployment on 08/26 --- terraform/main.tf | 66 ++++++++++++++++++++++----------------------- terraform/output.tf | 3 ++- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/terraform/main.tf b/terraform/main.tf index 135f1271..d60103f7 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -77,44 +77,44 @@ resource "aws_lb_listener_rule" "pds-registry-forward-rule" { # Credentials for ECR pull through cache from GHCR -resource "aws_secretsmanager_secret" "github_ecr_credentials" { - count = var.create_github_secret_credentials - - name = "ecr-pullthroughcache/github-credentials" - tags = var.common_tags -} - -resource "aws_secretsmanager_secret_version" "github_ecr_credentials" { - count = var.create_github_secret_credentials - - secret_id = aws_secretsmanager_secret.github_ecr_credentials[count.index].id - secret_string = jsonencode({ - username = var.github_username - accessToken = var.github_token - }) -} +#resource "aws_secretsmanager_secret" "github_ecr_credentials" { +# count = var.create_github_secret_credentials +# +# name = "ecr-pullthroughcache/github-credentials" +# tags = var.common_tags +#} + +#resource "aws_secretsmanager_secret_version" "github_ecr_credentials" { +# count = var.create_github_secret_credentials +# +# secret_id = aws_secretsmanager_secret.github_ecr_credentials[count.index].id +# secret_string = jsonencode({ +# username = var.github_username +# accessToken = var.github_token +# }) +#} # Look up the secret when it is not created by this script -data "aws_secretsmanager_secret" "github_ecr_credentials" { - count = 1 - var.create_github_secret_credentials - name = "ecr-pullthroughcache/github-credentials" -} +#data "aws_secretsmanager_secret" "github_ecr_credentials" { +# count = 1 - var.create_github_secret_credentials +# name = "ecr-pullthroughcache/github-credentials" +#} -locals { - github_ecr_credentials_arn = var.create_github_secret_credentials == 1 ? aws_secretsmanager_secret.github_ecr_credentials[0].arn : data.aws_secretsmanager_secret.github_ecr_credentials[0].arn -} +#locals { +# github_ecr_credentials_arn = var.create_github_secret_credentials == 1 ? aws_secretsmanager_secret.github_ecr_credentials[0].arn : data.aws_secretsmanager_secret.github_ecr_credentials[0].arn +#} # Add a Pull Through Cache rule for GHCR -resource "aws_ecr_pull_through_cache_rule" "ghcr" { - ecr_repository_prefix = "ghcr" - upstream_registry_url = "ghcr.io" - credential_arn = local.github_ecr_credentials_arn -} +#resource "aws_ecr_pull_through_cache_rule" "ghcr" { +# ecr_repository_prefix = "ghcr" +# upstream_registry_url = "ghcr.io" +# credential_arn = local.github_ecr_credentials_arn +#} -resource "aws_ecr_repository" "ghcr_registry_api" { - name = "ghcr/nasa-pds/registry-api" - tags = var.common_tags -} +#resource "aws_ecr_repository" "ghcr_registry_api" { +# name = "ghcr/nasa-pds/registry-api" +# tags = var.common_tags +#} # Log groups hold logs from our app. resource "aws_cloudwatch_log_group" "pds-registry-log-group" { @@ -211,6 +211,6 @@ resource "aws_ecs_service" "pds-registry-reg-service" { tags = var.common_tags - depends_on = [aws_ecr_repository.ghcr_registry_api, aws_ecr_pull_through_cache_rule.ghcr] + #depends_on = [aws_ecr_repository.ghcr_registry_api, aws_ecr_pull_through_cache_rule.ghcr] } diff --git a/terraform/output.tf b/terraform/output.tf index 737d4bcc..e0c7e92c 100644 --- a/terraform/output.tf +++ b/terraform/output.tf @@ -14,6 +14,7 @@ resource "aws_ssm_parameter" "load_balancer_domain" { name = "${local.ssm_prefix}/load-balancer-domain" description = "Registry API load balancer domain" type = "String" + overwrite = true value = aws_lb.registry-api-lb.dns_name tags = var.common_tags -} \ No newline at end of file +} From 490044a40dd0f89a509c4160bef34d97a1e3d84b Mon Sep 17 00:00:00 2001 From: Thomas Loubrieu Date: Fri, 28 Aug 2026 14:42:55 +0000 Subject: [PATCH 2/3] remove commented out code, to be cleaner --- terraform/main.tf | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/terraform/main.tf b/terraform/main.tf index d60103f7..f8871d67 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -76,46 +76,6 @@ resource "aws_lb_listener_rule" "pds-registry-forward-rule" { } -# Credentials for ECR pull through cache from GHCR -#resource "aws_secretsmanager_secret" "github_ecr_credentials" { -# count = var.create_github_secret_credentials -# -# name = "ecr-pullthroughcache/github-credentials" -# tags = var.common_tags -#} - -#resource "aws_secretsmanager_secret_version" "github_ecr_credentials" { -# count = var.create_github_secret_credentials -# -# secret_id = aws_secretsmanager_secret.github_ecr_credentials[count.index].id -# secret_string = jsonencode({ -# username = var.github_username -# accessToken = var.github_token -# }) -#} - -# Look up the secret when it is not created by this script -#data "aws_secretsmanager_secret" "github_ecr_credentials" { -# count = 1 - var.create_github_secret_credentials -# name = "ecr-pullthroughcache/github-credentials" -#} - -#locals { -# github_ecr_credentials_arn = var.create_github_secret_credentials == 1 ? aws_secretsmanager_secret.github_ecr_credentials[0].arn : data.aws_secretsmanager_secret.github_ecr_credentials[0].arn -#} - -# Add a Pull Through Cache rule for GHCR -#resource "aws_ecr_pull_through_cache_rule" "ghcr" { -# ecr_repository_prefix = "ghcr" -# upstream_registry_url = "ghcr.io" -# credential_arn = local.github_ecr_credentials_arn -#} - -#resource "aws_ecr_repository" "ghcr_registry_api" { -# name = "ghcr/nasa-pds/registry-api" -# tags = var.common_tags -#} - # Log groups hold logs from our app. resource "aws_cloudwatch_log_group" "pds-registry-log-group" { name = "/ecs/pds-registry-api-task" From aea349e2b520ed9d874455b3fa6025091e83a8e2 Mon Sep 17 00:00:00 2001 From: Jordan Padams <33492486+jordanpadams@users.noreply.github.com> Date: Thu, 3 Sep 2026 12:10:01 -0700 Subject: [PATCH 3/3] Removing commented out code --- terraform/main.tf | 2 -- 1 file changed, 2 deletions(-) diff --git a/terraform/main.tf b/terraform/main.tf index f8871d67..349cd699 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -170,7 +170,5 @@ resource "aws_ecs_service" "pds-registry-reg-service" { } tags = var.common_tags - - #depends_on = [aws_ecr_repository.ghcr_registry_api, aws_ecr_pull_through_cache_rule.ghcr] }