Skip to content

Commit 5cb8495

Browse files
authored
breaking: upgrade to zero 0.1.0 (#194)
* breaking: upgrade to zero 0.1.0 this change uses the new zero version which removed global credential file, and moved all the credentials to the zero-project.yml zero-project.yml becomes the single source of truth for create/apply Other notable changes include: - module parameters conditions - module parameter custom type - zeroVersion requirement: error out upon incompatible zero version * fixup! breaking: upgrade to zero 0.1.0
1 parent f09cfb5 commit 5cb8495

1 file changed

Lines changed: 66 additions & 18 deletions

File tree

zero-module.yml

Lines changed: 66 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: zero-aws-eks-stack
22
description: 'zero module for an AWS kubernetes stack on EKS'
33
author: 'Commit'
4+
zeroVersion: '>= 0.1.0'
45

56
template:
67
strictMode: true
@@ -15,12 +16,42 @@ requiredCredentials:
1516
- github
1617

1718
parameters:
19+
- field: useExistingAwsProfile
20+
label: "Use credentials from an existing AWS profile?"
21+
options:
22+
"yes": "Yes"
23+
"no": "No"
24+
omitFromProjectFile: yes
25+
- field: profilePicker
26+
omitFromProjectFile: yes
27+
type: AWSProfilePicker
28+
conditions:
29+
- action: KeyMatchCondition
30+
whenValue: "yes"
31+
matchField: useExistingAwsProfile
32+
- field: accessKeyId
33+
label: AWS AccessKeyId
34+
envVarName: "AWS_ACCESS_KEY_ID"
35+
conditions:
36+
- action: KeyMatchCondition
37+
whenValue: "no"
38+
matchField: useExistingAwsProfile
39+
- field: secretAccessKey
40+
envVarName: "AWS_SECRET_ACCESS_KEY"
41+
label: AWS SecretAccessKey
42+
conditions:
43+
- action: KeyMatchCondition
44+
whenValue: "no"
45+
matchField: useExistingAwsProfile
46+
- field: githubAccessToken
47+
label: "Github API Key to setup your repository and optionally CI/CD"
48+
envVarName: GITHUB_ACCESS_TOKEN
1849
- field: region
1950
label: Select AWS Region
2051
options:
21-
- "us-west-2"
22-
- "us-east-1"
23-
- "us-east-2"
52+
"us-west-2": "us-west-2 (Oregon)"
53+
"us-east-1": "us-east-1 (N. Virginia)"
54+
"us-east-2": "us-east-2 (Ohio)"
2455
- field: productionHostRoot
2556
label: Production Root Host Name (e.g. mydomain.com) - this must be the root of the chosen domain, not a subdomain.
2657
fieldValidation:
@@ -61,40 +92,57 @@ parameters:
6192
type: regex
6293
value: '^([a-z0-9]+(-[a-z0-9]+)*\.)$'
6394
errorMessage: Invalid subdomain (cannot contain special chars & must end with a '.')
95+
- field: CIVendor
96+
label: Using either circleCI or github Actions to build / test your repository
97+
default: "circleci"
98+
options:
99+
"circleci": "CircleCi"
100+
"github-actions": "Github Actions"
101+
- field: circleciApiKey
102+
label: "Circle CI API Key to setup your CI/CD for repositories"
103+
envVarName: CIRCLECI_API_KEY
104+
conditions:
105+
- action: KeyMatchCondition
106+
matchField: CIVendor
107+
whenValue: "circleci"
64108
- field: database
65109
label: Database engine to use (postgres)
66110
options:
67-
- "postgres"
68-
- "mysql"
111+
"postgres": "PostgreSQL"
112+
"mysql": "MySQL"
69113
- field: cacheStore
70114
label: "Cache store to use (default: no cache)"
71115
options:
72-
- "none"
73-
- "redis"
74-
- "memcached"
116+
"none": "none"
117+
"redis": "Redis"
118+
"memcached": "Memcached"
75119
- field: loggingType
76120
label: Application logging to configure. Cloudwatch is cheaper with a more limited feature set. Elasticsearch + Kibana will set up more infrastructure but enable a much richer logging search and visualization experience.
77121
options:
78-
- "cloudwatch"
79-
- "kibana"
122+
"cloudwatch": "AWS CloudWatch"
123+
"kibana": "Kibana"
80124
- field: metricsType
81125
label: Additional application metrics method to configure. Metrics are available through CloudWatch, but choosing prometheus will install Prometheus and Grafana, for a richer metrics experience. No additional infrastructure is required, but a number of prometheus pods will need to exist in the cluster, utilizing some resources.
82126
options:
83-
- "none"
84-
- "prometheus"
127+
"none": "none"
128+
"prometheus": "Prometheus"
85129
- field: notificationServiceEnabled
86130
label: "Install the Zero Notification Service in your cluster?"
87131
info: Provides easy notification capability through email, slack, etc. - https://github.com/commitdev/zero-notification-service
88132
default: yes
89133
options:
90-
- "yes"
91-
- "no"
134+
"yes": "Yes"
135+
"no": "No"
92136
- field: sendgridApiKey
93137
label: "API key to setup email integration (optional: leave blank to opt-out of Sendgrid setup)"
94138
info: Signup at https://signup.sendgrid.com or create an API key at https://app.sendgrid.com/settings/api_keys - Sendgrid is an email delivery service enabling transactional email sending and more.
95139
- field: notificationServiceSlackApiKey
96140
label: "API key of your Slack bot if you want to use Slack with the Zero Notification Service. Leave blank if not applicable."
97141
info: See https://slack.com/intl/en-ca/help/articles/215770388-Create-and-regenerate-API-tokens
142+
conditions:
143+
- action: KeyMatchCondition
144+
whenValue: "yes"
145+
matchField: notificationServiceEnabled
98146
- field: accountId
99147
label: AWS Account ID
100148
execute: aws sts get-caller-identity --query "Account" | tr -d '"'
@@ -108,11 +156,11 @@ parameters:
108156
label: Enable file uploads using S3 and Cloudfront signed URLs? (Will require manual creation of a Cloudfront keypair in AWS)
109157
default: yes
110158
options:
111-
- "yes"
112-
- "no"
159+
"yes": "Yes"
160+
"no": "No"
113161
- field: userAuth
114162
label: Enable user management using Kratos and authentication using the Oathkeeper access proxy?
115163
default: yes
116164
options:
117-
- "yes"
118-
- "no"
165+
"yes": "Yes"
166+
"no": "No"

0 commit comments

Comments
 (0)