From e3e3774cae2c613407ff01ad0dc9b6fb34186fdb Mon Sep 17 00:00:00 2001 From: vivid-cpreston <97257824+vivid-cpreston@users.noreply.github.com> Date: Fri, 14 Apr 2023 11:06:58 -0700 Subject: [PATCH] New url (#682) * updates for vanity url --- terraform/cloudfront.tf | 14 ++++++++------ terraform/prod/terragrunt.hcl | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/terraform/cloudfront.tf b/terraform/cloudfront.tf index f0667f65ac..88e0f9997d 100644 --- a/terraform/cloudfront.tf +++ b/terraform/cloudfront.tf @@ -367,7 +367,7 @@ resource "aws_cloudfront_distribution" "wfnews_geofencing_gov_client" { "PUT"] cached_methods = ["GET", "HEAD"] - target_origin_id = "wfnews_client_${var.target_env}" + target_origin_id = "wfnews_client_gov_${var.target_env}" forwarded_values { query_string = true @@ -389,7 +389,7 @@ resource "aws_cloudfront_distribution" "wfnews_geofencing_gov_client" { allowed_methods = ["GET", "HEAD"] cached_methods = ["GET", "HEAD"] - target_origin_id = "wfnews_client_${var.target_env}" + target_origin_id = "wfnews_client_gov_${var.target_env}" forwarded_values { query_string = false @@ -412,6 +412,7 @@ resource "aws_cloudfront_distribution" "wfnews_geofencing_gov_client" { restriction_type = "whitelist" locations = [ "CA", + "US", "AR" ] } @@ -442,7 +443,7 @@ resource "aws_cloudfront_distribution" "wfnews_geofencing_gov_api" { } domain_name = "${var.apisix_names[0]}.${var.license_plate}-${var.target_env}.nimbus.cloud.gov.bc.ca" - origin_id = "wfnews_apisix_${var.target_env}" + origin_id = "wfnews_apisix_gov_${var.target_env}" custom_header { name = "X-Cloudfront-Header" value = var.cloudfront_header @@ -473,7 +474,7 @@ resource "aws_cloudfront_distribution" "wfnews_geofencing_gov_api" { "PUT"] cached_methods = ["GET", "HEAD"] - target_origin_id = "wfnews_apisix_${var.target_env}" + target_origin_id = "wfnews_apisix_gov_${var.target_env}" forwarded_values { query_string = true @@ -495,7 +496,7 @@ resource "aws_cloudfront_distribution" "wfnews_geofencing_gov_api" { allowed_methods = ["GET", "HEAD"] cached_methods = ["GET", "HEAD"] - target_origin_id = "wfnews_apisix_${var.target_env}" + target_origin_id = "wfnews_apisix_gov_${var.target_env}" forwarded_values { query_string = false @@ -518,6 +519,7 @@ resource "aws_cloudfront_distribution" "wfnews_geofencing_gov_api" { restriction_type = "whitelist" locations = [ "CA", + "US", "AR" ] } @@ -526,7 +528,7 @@ resource "aws_cloudfront_distribution" "wfnews_geofencing_gov_api" { tags = local.common_tags viewer_certificate { - acm_certificate_arn = var.gov_certificate_arn + acm_certificate_arn = var.gov_api_certificate_arn ssl_support_method = "sni-only" } } diff --git a/terraform/prod/terragrunt.hcl b/terraform/prod/terragrunt.hcl index e30d34ebcf..5edecf48a6 100644 --- a/terraform/prod/terragrunt.hcl +++ b/terraform/prod/terragrunt.hcl @@ -107,8 +107,8 @@ generate "test_tfvars" { license_plate = "${local.license_plate}" sns_email_targets = "${local.sns_email_targets}" certificate_arn = "arn:aws:acm:us-east-1:598317316742:certificate/cb36048d-70e1-45e9-b2eb-2e0ea7e808cf" - gov_certificate_arn = "arn:aws:acm:us-east-1:598317316742:certificate/c9661e46-ee96-40f2-8fe7-de9e0cf1497b" - gov_api_certificate_arn = "arn:aws:acm:us-east-1:598317316742:certificate/c127327c-295a-4afd-8545-5b47c4891b91" + gov_certificate_arn = "arn:aws:acm:us-east-1:598317316742:certificate/c127327c-295a-4afd-8545-5b47c4891b91" + gov_api_certificate_arn = "arn:aws:acm:us-east-1:598317316742:certificate/c9661e46-ee96-40f2-8fe7-de9e0cf1497b" WEBADE-OAUTH2_TOKEN_CLIENT_URL = "${local.WEBADE-OAUTH2_TOKEN_CLIENT_URL}" WEBADE-OAUTH2_TOKEN_URL ="${local.WEBADE-OAUTH2_TOKEN_URL}" WEBADE_OAUTH2_WFNEWS_REST_CLIENT_SECRET ="${local.WEBADE_OAUTH2_WFNEWS_REST_CLIENT_SECRET}"