Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop region parameterisation #363

Merged
merged 2 commits into from
Feb 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/good-eggs-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'skuba': patch
---

**template:** Drop region parameterisation
1 change: 0 additions & 1 deletion template/express-rest-api/.gantry/common.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
prodAccountId: '<%- prodAwsAccountId %>'

image: '{{values "prodAccountId"}}.dkr.ecr.ap-southeast-2.amazonaws.com/{{values "service"}}:{{.BuildID}}'
region: ap-southeast-2
service: '<%- serviceName %>'

# TODO: enable Datadog agent
Expand Down
3 changes: 1 addition & 2 deletions template/express-rest-api/gantry.apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ name: '{{values "service"}}'

image: '{{values "image"}}'

region: '{{values "region"}}'
region: ap-southeast-2

env:
# https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/node-reusing-connections.html
AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1'

ENVIRONMENT: '{{.Environment}}'
REGION: '{{values "region"}}'
SERVICE: '{{values "service"}}'

{{range $key, $value := .Values.env}}
Expand Down
3 changes: 0 additions & 3 deletions template/express-rest-api/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ interface Config {

logLevel: string;
name: string;
region: string;
version: string;

metricsServer?: string;
Expand All @@ -26,7 +25,6 @@ const configs: Record<Environment, () => Omit<Config, 'environment'>> = {
local: () => ({
logLevel: 'debug',
name: '<%- serviceName %>',
region: 'ap-southeast-2',
version: 'local',

port: Env.nonNegativeInteger('PORT', { default: Number('<%- port %>') }),
Expand All @@ -48,7 +46,6 @@ const configs: Record<Environment, () => Omit<Config, 'environment'>> = {
[prod]: () => ({
logLevel: 'info',
name: Env.string('SERVICE'),
region: Env.string('REGION'),
version: Env.string('VERSION'),

metricsServer: 'localhost',
Expand Down
1 change: 0 additions & 1 deletion template/express-rest-api/src/framework/logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { config } from 'src/config';
export const rootLogger = createLogger({
base: {
environment: config.environment,
region: config.region,
version: config.version,
},

Expand Down
1 change: 0 additions & 1 deletion template/koa-rest-api/.gantry/common.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
prodAccountId: '<%- prodAwsAccountId %>'

image: '{{values "prodAccountId"}}.dkr.ecr.ap-southeast-2.amazonaws.com/{{values "service"}}:{{.BuildID}}'
region: ap-southeast-2
service: '<%- serviceName %>'

# TODO: enable Datadog agent
Expand Down
3 changes: 1 addition & 2 deletions template/koa-rest-api/gantry.apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ name: '{{values "service"}}'

image: '{{values "image"}}'

region: '{{values "region"}}'
region: ap-southeast-2

env:
# https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/node-reusing-connections.html
AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1'

ENVIRONMENT: '{{.Environment}}'
REGION: '{{values "region"}}'
SERVICE: '{{values "service"}}'

{{range $key, $value := .Values.env}}
Expand Down
3 changes: 0 additions & 3 deletions template/koa-rest-api/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ interface Config {

logLevel: string;
name: string;
region: string;
version: string;

metricsServer?: string;
Expand All @@ -26,7 +25,6 @@ const configs: Record<Environment, () => Omit<Config, 'environment'>> = {
local: () => ({
logLevel: 'debug',
name: '<%- serviceName %>',
region: 'ap-southeast-2',
version: 'local',

port: Env.nonNegativeInteger('PORT', { default: Number('<%- port %>') }),
Expand All @@ -48,7 +46,6 @@ const configs: Record<Environment, () => Omit<Config, 'environment'>> = {
[prod]: () => ({
logLevel: 'info',
name: Env.string('SERVICE'),
region: Env.string('REGION'),
version: Env.string('VERSION'),

metricsServer: 'localhost',
Expand Down
1 change: 0 additions & 1 deletion template/koa-rest-api/src/framework/logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { Context } from 'src/types/koa';
export const rootLogger = createLogger({
base: {
environment: config.environment,
region: config.region,
version: config.version,
},

Expand Down
3 changes: 0 additions & 3 deletions template/lambda-sqs-worker/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ interface Config {

logLevel: string;
name: string;
region: string;
version: string;

destinationSnsTopicArn: string;
Expand All @@ -22,7 +21,6 @@ const configs: Record<Environment, () => Omit<Config, 'environment'>> = {
local: () => ({
logLevel: 'debug',
name: '<%- serviceName %>',
region: 'ap-southeast-2',
version: 'local',

destinationSnsTopicArn: 'arn:aws:sns:us-east-2:123456789012:destination',
Expand All @@ -44,7 +42,6 @@ const configs: Record<Environment, () => Omit<Config, 'environment'>> = {
prod: () => ({
logLevel: 'info',
name: Env.string('SERVICE'),
region: Env.string('AWS_REGION'),
version: Env.string('VERSION'),

destinationSnsTopicArn: Env.string('DESTINATION_SNS_TOPIC_ARN'),
Expand Down
1 change: 0 additions & 1 deletion template/lambda-sqs-worker/src/framework/logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { config } from 'src/config';
export const rootLogger = createLogger({
base: {
environment: config.environment,
region: config.region,
version: config.version,
},

Expand Down