Skip to content

Commit af4d57a

Browse files
committed
Change parameter names to fit new format from the doc we are working off, and so zero.yml can be shared between all projects
1 parent 204c9a7 commit af4d57a

File tree

7 files changed

+18
-39
lines changed

7 files changed

+18
-39
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Then get the aws account id:
3939
aws sts get-caller-identity --query "Account"
4040
```
4141

42-
Then create a `config.yml` file and fill in the appropriate values:
42+
Then create a `zero.yml` file and fill in the appropriate values:
4343

4444
```yaml
4545
name: my-project
@@ -48,8 +48,13 @@ params:
4848
region: us-east-1
4949
accountId: <from above>
5050
kubeWorkerAMI: ami-<from above>
51-
productionHost: domain.com
52-
stagingHost: domain-staging.com
51+
productionHostRoot: domain.com
52+
productionFrontendHost: domain.com
53+
productionBackendHost: api.domain.com
54+
stagingHostRoot: domain-staging.com
55+
stagingFrontendHost: domain-staging.com
56+
stagingBackendHost: api.domain-staging.com
57+
5358
```
5459

5560
And run `stack`:

commit0.module.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,3 @@
1-
name: basic-infrastructure
2-
description: ''
3-
author: ''
4-
icon: ''
5-
thumbnail: ''
6-
7-
prompts:
8-
- field: region
9-
label: Select AWS Region
10-
options:
11-
- "us-west-1"
12-
- "us-west-2"
13-
- "us-east-1"
14-
- "us-east-2"
15-
- "ca-central-1"
16-
- "eu-central-1"
17-
- "eu-west-1"
18-
- "ap-east-1"
19-
- "ap-south-1"
20-
- field: accountId
21-
label: AWS Account ID
22-
- field: productionHost
23-
label: Production Root Host Name (e.g. mydomain.com)
24-
- field: stagingHost
25-
label: Staging Root Host Name (e.g. mydomain-staging.com)
26-
271
template:
282
strictMode: true
293
delimiters:

kubernetes/terraform/environments/development/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ module "kubernetes" {
1818
# Authenticate with the EKS cluster via the cluster id
1919
cluster_name = "<% .Name %>-dev-<% index .Params `region` %>"
2020

21-
external_dns_zone = "<% index .Params `stagingHost` %>"
21+
external_dns_zone = "<% index .Params `stagingHostRoot` %>"
2222
external_dns_owner_id = "<% GenerateUUID %>" # randomly generated ID
2323

2424
# Registration email for LetsEncrypt
25-
cert_manager_acme_registration_email = "devops@<% index .Params `stagingHost` %>"
25+
cert_manager_acme_registration_email = "devops@<% index .Params `stagingHostRoot` %>"
2626
}

kubernetes/terraform/environments/production/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ module "kubernetes" {
1818
# Authenticate with the EKS cluster via the cluster id
1919
cluster_name = "<% .Name %>-production-<% index .Params `region` %>"
2020

21-
external_dns_zone = "<% index .Params `productionHost` %>"
21+
external_dns_zone = "<% index .Params `productionHostRoot` %>"
2222
external_dns_owner_id = "<% GenerateUUID %>" # randomly generated ID
2323

2424
# Registration email for LetsEncrypt
25-
cert_manager_acme_registration_email = "devops@<% index .Params `productionHost` %>"
25+
cert_manager_acme_registration_email = "devops@<% index .Params `productionHostRoot` %>"
2626
}

kubernetes/terraform/environments/staging/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ module "kubernetes" {
2222
# Authenticate with the EKS cluster via the cluster id
2323
cluster_name = "<% .Name %>-staging-<% index .Params `region` %>"
2424

25-
external_dns_zone = "<% index .Params `stagingHost` %>"
25+
external_dns_zone = "<% index .Params `stagingHostRoot` %>"
2626
external_dns_owner_id = "<% GenerateUUID %>" # randomly generated ID
2727

2828
# Registration email for LetsEncrypt
29-
cert_manager_acme_registration_email = "devops@<% index .Params `stagingHost` %>"
29+
cert_manager_acme_registration_email = "devops@<% index .Params `stagingHostRoot` %>"
3030
}

terraform/environments/production/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ module "production" {
3333

3434
# Hosting configuration
3535
s3_hosting_buckets = [
36-
"assets.<% index .Params `productionHost` %>"
36+
"<% index .Params `productionFrontendHost` %>"
3737
]
38-
domain_name = "<% index .Params `productionHost` %>"
38+
domain_name = "<% index .Params `productionHostRoot` %>"
3939

4040
# DB configuration
4141
db_instance_class = "db.t3.small"

terraform/environments/staging/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ module "staging" {
3333

3434
# Hosting configuration
3535
s3_hosting_buckets = [
36-
"assets.<% index .Params `stagingHost` %>",
36+
"<% index .Params `stagingFrontendHost` %>",
3737
]
38-
domain_name = "<% index .Params `stagingHost` %>"
38+
domain_name = "<% index .Params `stagingHostRoot` %>"
3939

4040
# DB configuration
4141
db_instance_class = "db.t3.small"

0 commit comments

Comments
 (0)