From 4677039d21a9f8af94f05b5f796dc80daaee3afb Mon Sep 17 00:00:00 2001 From: Jennifer Tran Date: Thu, 13 Jun 2024 16:41:15 -0700 Subject: [PATCH 1/2] fix: update update_cloudfront resource count conditional --- infrastructure/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infrastructure/main.tf b/infrastructure/main.tf index ac2bc0cd..c68bf59e 100644 --- a/infrastructure/main.tf +++ b/infrastructure/main.tf @@ -272,11 +272,11 @@ resource "null_resource" "update_cloudfront" { always_run = "${timestamp()}" } - count = coalesce(var.cloudfront_id, false) ? 1 : 0 + count = coalesce(var.cloudfront_id, false) != false ? 1 : 0 provisioner "local-exec" { command = "${path.module}/cf_update.sh ${var.cloudfront_id} workflows_api_origin \"${aws_apigatewayv2_api.workflows_http_api.api_endpoint}\"" } depends_on = [aws_apigatewayv2_api.workflows_http_api] -} \ No newline at end of file +} From 7f1400aa9b0db325364e98ebcdfb21289f5caaaa Mon Sep 17 00:00:00 2001 From: Jennifer Tran Date: Fri, 14 Jun 2024 09:01:52 -0700 Subject: [PATCH 2/2] Update cloudfront tfvars template to be VEDA_CLOUDFRONT_ID --- infrastructure/terraform.tfvars.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure/terraform.tfvars.tmpl b/infrastructure/terraform.tfvars.tmpl index c8e75b82..0e49bc17 100644 --- a/infrastructure/terraform.tfvars.tmpl +++ b/infrastructure/terraform.tfvars.tmpl @@ -17,7 +17,7 @@ vector_secret_name="${VECTOR_SECRET_NAME}" vector_security_group="${VECTOR_SECURITY_GROUP}" vector_vpc="${VECTOR_VPC:-null}" workflow_root_path="${WORKFLOW_ROOT_PATH}" -cloudfront_id="${CLOUDFRONT_ID}" +cloudfront_id="${VEDA_CLOUDFRONT_ID}" cognito_domain="${VEDA_COGNITO_DOMAIN}" client_id="${VEDA_CLIENT_ID}" userpool_id="${VEDA_USERPOOL_ID}"