Skip to content

Commit 0d2e23f

Browse files
authored
Merge pull request #77 from Pocket/fix/tags
fix(tags): adding in cost center tags
2 parents 9c23c9f + f435a4a commit 0d2e23f

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.aws/.terraform-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.6.6
1+
1.8.5

.aws/src/config/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,8 @@ export const config = {
4444
tags: {
4545
service: name,
4646
environment,
47+
app_code: 'content',
48+
component_code: `content-${name.toLowerCase()}`,
49+
env_code: isDev ? 'dev' : 'prod',
4750
},
4851
};

.aws/src/main.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ class Stack extends TerraformStack {
3030
constructor(scope: Construct, name: string) {
3131
super(scope, name);
3232

33-
new AwsProvider(this, 'aws', { region: 'us-east-1' });
33+
new AwsProvider(this, 'aws', {
34+
region: 'us-east-1',
35+
defaultTags: [{ tags: config.tags }],
36+
});
3437
new PagerdutyProvider(this, 'pagerduty_provider', { token: undefined });
3538
new LocalProvider(this, 'local_provider');
3639
new NullProvider(this, 'null_provider');
@@ -148,7 +151,6 @@ class Stack extends TerraformStack {
148151
internal: false,
149152
prefix: config.prefix,
150153
alb6CharacterPrefix: config.shortName,
151-
tags: config.tags,
152154
cdn: false,
153155
domain: config.domain,
154156
containerConfigs: [
@@ -373,7 +375,6 @@ class Stack extends TerraformStack {
373375
name: `/Backend/${config.prefix}/ecs/${containerName}`,
374376
retentionInDays: 90,
375377
skipDestroy: true,
376-
tags: config.tags,
377378
}
378379
);
379380

0 commit comments

Comments
 (0)