Skip to content

Commit

Permalink
feat: support for component level default tags (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
zackhee997 authored Oct 3, 2024
1 parent 5e4c161 commit 6a742c2
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ export class FoggStack extends TerraformStack {
...(this.foggComp.backend.s3?.key_path && {
tfstateKey: this.foggComp.backend.s3?.key_path,
}),
...(this.foggComp.providers_configuration?.aws?.default_tags?.enabled &&
(this.foggComp.providers_configuration?.aws?.default_tags?.tags ?? {})),
},
},
];
Expand Down
10 changes: 10 additions & 0 deletions testdata/v2_cdktf_components/fogg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ envs:
test:
components:
lambda:
providers:
aws:
default_tags:
enabled: true
tags:
team: TIES
kind: cdktf
cdktf_dependencies:
- name: "@types/aws-lambda"
Expand All @@ -40,6 +46,10 @@ envs:
- name: iam-floyd
version: "^0.507.0"
network:
providers:
aws:
default_tags:
enabled: true
kind: cdktf
depends_on:
files:
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ export class FoggStack extends TerraformStack {
...(this.foggComp.backend.s3?.key_path && {
tfstateKey: this.foggComp.backend.s3?.key_path,
}),
...(this.foggComp.providers_configuration?.aws?.default_tags?.enabled &&
(this.foggComp.providers_configuration?.aws?.default_tags?.tags ?? {})),
},
},
];
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ export class FoggStack extends TerraformStack {
...(this.foggComp.backend.s3?.key_path && {
tfstateKey: this.foggComp.backend.s3?.key_path,
}),
...(this.foggComp.providers_configuration?.aws?.default_tags?.enabled &&
(this.foggComp.providers_configuration?.aws?.default_tags?.tags ?? {})),
},
},
];
Expand Down

0 comments on commit 6a742c2

Please sign in to comment.