Skip to content

Commit

Permalink
Wfnews 1116 (#720)
Browse files Browse the repository at this point in the history
* Updated syntax and formatting
  • Loading branch information
vivid-cpreston authored May 17, 2023
1 parent 9b35383 commit d6b6fd7
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 95 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
AGOL_BANS_AND_PROHIBITIONS: https://services6.arcgis.com/ubm4tcTYICKBpist/ArcGIS/rest/services/British_Columbia_Bans_and_Prohibition_Areas/FeatureServer/0/
GITHUB_RELEASE_NAME: ${{ github.event.release.name }}
DB_SIZE: 20
MAX_UPLOAD_SIZE: 20M
MAX_UPLOAD_SIZE: 10M

secrets:
CLOUDFRONT_HEADER: ${{ secrets.CLOUDFRONT_HEADER_PROD }}
Expand Down
33 changes: 10 additions & 23 deletions terraform/cloudfront.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,8 @@ resource "aws_cloudfront_distribution" "wfnews_geofencing_client" {

restrictions {
geo_restriction {
restriction_type = "whitelist"
locations = [
"CA",
"AR"
]
restriction_type = var.target_env == "prod" ? "blacklist" : "whitelist"
locations = var.target_env == "prod" ? [] : ["CA", "US", "AR"]
}
}

Expand Down Expand Up @@ -194,11 +191,8 @@ resource "aws_cloudfront_distribution" "wfnews_geofencing_server" {

restrictions {
geo_restriction {
restriction_type = "whitelist"
locations = [
"CA",
"AR"
]
restriction_type = var.target_env == "prod" ? "blacklist" : "whitelist"
locations = var.target_env == "prod" ? [] : ["CA", "US", "AR"]
}
}

Expand Down Expand Up @@ -302,11 +296,8 @@ resource "aws_cloudfront_distribution" "wfnews_geofencing_apisix" {

restrictions {
geo_restriction {
restriction_type = "whitelist"
locations = [
"CA",
"AR"
]
restriction_type = var.target_env == "prod" ? "blacklist" : "whitelist"
locations = var.target_env == "prod" ? [] : ["CA", "US", "AR"]
}
}

Expand Down Expand Up @@ -409,12 +400,8 @@ resource "aws_cloudfront_distribution" "wfnews_geofencing_gov_client" {

restrictions {
geo_restriction {
restriction_type = "whitelist"
locations = [
"CA",
"US",
"AR"
]
restriction_type = var.target_env == "prod" ? "blacklist" : "whitelist"
locations = var.target_env == "prod" ? [] : ["CA", "US", "AR"]
}
}

Expand Down Expand Up @@ -516,8 +503,8 @@ resource "aws_cloudfront_distribution" "wfnews_geofencing_gov_api" {

restrictions {
geo_restriction {
restriction_type = var.target_env = "prod" ? "blacklist" : "whitelist"
locations = var.target_env = "prod" ? [] : ["CA","US","AR"]
restriction_type = var.target_env == "prod" ? "blacklist" : "whitelist"
locations = var.target_env == "prod" ? [] : ["CA", "US", "AR"]
}
}

Expand Down
Loading

0 comments on commit d6b6fd7

Please sign in to comment.