From 99892e55b98e021dc6a958568f371b166f9c94e3 Mon Sep 17 00:00:00 2001 From: Rakowskiii Date: Wed, 26 Jul 2023 17:03:31 +0200 Subject: [PATCH] fix: add registry auth token --- .github/workflows/deploy-infra.yml | 1 + terraform/ecs/main.tf | 1 + terraform/ecs/variables.tf | 4 ++++ terraform/main.tf | 1 + terraform/variables.tf | 5 +++++ 5 files changed, 12 insertions(+) diff --git a/.github/workflows/deploy-infra.yml b/.github/workflows/deploy-infra.yml index 762b7be..66ab644 100644 --- a/.github/workflows/deploy-infra.yml +++ b/.github/workflows/deploy-infra.yml @@ -113,6 +113,7 @@ jobs: TF_VAR_relay_url: ${{inputs.relay_url}} TF_VAR_cast_url: ${{inputs.cast_url}} TF_VAR_data_lake_bucket_key_arn: ${{env.ANALYTICS_DATA_LAKE_KMS_KEY_ARN}} + TF_VAR_registry_auth_token: ${{secrets.registry_auth_token}} with: environment: ${{ inputs.environment }} diff --git a/terraform/ecs/main.tf b/terraform/ecs/main.tf index fad072d..f1ea24d 100644 --- a/terraform/ecs/main.tf +++ b/terraform/ecs/main.tf @@ -81,6 +81,7 @@ resource "aws_ecs_task_definition" "app_task_definition" { { name = "RELAY_URL", value = var.relay_url }, { name = "CAST_URL", value = var.cast_url }, { name = "REGISTRY_URL", value = var.registry_url }, + { name = "REGISTRY_AUTH_TOKEN", value = var.registry_auth_token }, ], dependsOn = [ { containerName = "aws-otel-collector", condition = "START" } diff --git a/terraform/ecs/variables.tf b/terraform/ecs/variables.tf index 77dd978..4978248 100644 --- a/terraform/ecs/variables.tf +++ b/terraform/ecs/variables.tf @@ -103,3 +103,7 @@ variable "registry_url" { description = "The url of registry with project data" type = string } +variable "registry_auth_token" { + description = "The auth token for registry" + type = string +} diff --git a/terraform/main.tf b/terraform/main.tf index b1c89c4..3e2b431 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -86,6 +86,7 @@ module "ecs" { relay_url = var.relay_url cast_url = var.cast_url registry_url = var.registry_url + registry_auth_token = var.registry_auth_token telemetry_sample_ratio = local.environment == "prod" ? 0.25 : 1.0 allowed_origins = local.environment == "prod" ? "https://cloud.walletconnect.com" : "*" diff --git a/terraform/variables.tf b/terraform/variables.tf index cb27507..e64787f 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -68,3 +68,8 @@ variable "registry_url" { type = string default = "https://registry-prod-cf.walletconnect.com" } + +variable "registry_auth_token" { + description = "The auth token for registry" + type = string +}