From 7addd0c2e5333aabf1b8deb75d2fa207cb8585c5 Mon Sep 17 00:00:00 2001 From: David Cheung Date: Wed, 10 Jun 2020 14:41:45 -0400 Subject: [PATCH] default subdomain values for zero-module.yml --- .../terraform/environments/production/main.tf | 2 +- .../terraform/environments/staging/main.tf | 2 +- zero-module.yml | 20 +++++++++++-------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/templates/terraform/environments/production/main.tf b/templates/terraform/environments/production/main.tf index bfabca7..54fd78a 100644 --- a/templates/terraform/environments/production/main.tf +++ b/templates/terraform/environments/production/main.tf @@ -34,7 +34,7 @@ module "production" { # Hosting configuration s3_hosting_buckets = [ - "<% index .Params `productionFrontendHost` %>" + "<% index .Params `productionFrontendSubdomain` %><% index .Params `productionHostRoot` %>" ] domain_name = "<% index .Params `productionHostRoot` %>" diff --git a/templates/terraform/environments/staging/main.tf b/templates/terraform/environments/staging/main.tf index 4d571fb..bc31a45 100644 --- a/templates/terraform/environments/staging/main.tf +++ b/templates/terraform/environments/staging/main.tf @@ -33,7 +33,7 @@ module "staging" { # Hosting configuration s3_hosting_buckets = [ - "<% index .Params `stagingFrontendHost` %>", + "<% index .Params `stagingFrontendSubdomain` %><% index .Params `stagingHostRoot` %>", ] domain_name = "<% index .Params `stagingHostRoot` %>" diff --git a/zero-module.yml b/zero-module.yml index acf3e44..a2fe47a 100644 --- a/zero-module.yml +++ b/zero-module.yml @@ -24,16 +24,20 @@ parameters: - "us-east-2" - field: productionHostRoot label: Production Root Host Name (e.g. mydomain.com) - this must be the root of the chosen domain, not a subdomain. - - field: productionFrontendHost - label: Production Frontend Host Name (e.g. app.mydomain.com) - - field: productionBackendHost - label: Production Backend Host Name (e.g. api.mydomain.com) + - field: productionFrontendSubdomain + label: Production Frontend Host Name (e.g. app.) + default: app. + - field: productionBackendSubdomain + label: Production Backend Host Name (e.g. api.) + default: api. - field: stagingHostRoot label: Staging Root Host Name (e.g. mydomain-staging.com) - this must be the root of the chosen domain, not a subdomain. - - field: stagingFrontendHost - label: Staging Frontend Host Name (e.g. app.mydomain-staging.com) - - field: stagingBackendHost - label: Staging Backend Host Name (e.g. api.mydomain-staging.com) + - field: stagingFrontendSubdomain + label: Staging Frontend Host Name (e.g. app.) + default: app. + - field: stagingBackendSubdomain + label: Staging Backend Host Name (e.g. api.) + default: api. - field: accountId label: AWS Account ID execute: aws sts get-caller-identity --query "Account" | tr -d '"'