@@ -20,21 +20,24 @@ type ServiceArgs = {
2020} ;
2121
2222export type DatabaseService = { type : 'DATABASE' } & ServiceArgs &
23- Omit < DatabaseArgs , 'vpc' > ;
23+ Omit < DatabaseArgs , 'vpc' | 'tags' > ;
2424
2525export type RedisService = { type : 'REDIS' } & ServiceArgs &
2626 Pick < RedisArgs , 'dbName' | 'region' > ;
2727
2828export type StaticSiteService = { type : 'STATIC_SITE' } & ServiceArgs &
29- Omit < StaticSiteArgs , 'hostedZoneId' > ;
29+ Omit < StaticSiteArgs , 'hostedZoneId' | 'tags' > ;
3030
3131export type WebServerService = {
3232 type : 'WEB_SERVER' ;
3333 environment ?:
3434 | aws . ecs . KeyValuePair [ ]
3535 | ( ( services : Services ) => aws . ecs . KeyValuePair [ ] ) ;
3636} & ServiceArgs &
37- Omit < WebServerArgs , 'cluster' | 'vpc' | 'hostedZoneId' | 'environment' > ;
37+ Omit <
38+ WebServerArgs ,
39+ 'cluster' | 'vpc' | 'hostedZoneId' | 'environment' | 'tags'
40+ > ;
3841
3942export type Environment = ( typeof Environment ) [ keyof typeof Environment ] ;
4043
@@ -89,6 +92,9 @@ export class Project extends pulumi.ComponentResource {
8992 this . ec2SSMConnect = new Ec2SSMConnect ( `${ name } -ssm-connect` , {
9093 vpc : this . vpc ,
9194 sshPublicKey : sshConfig . require ( 'publicKey' ) ,
95+ tags : {
96+ Env : this . environment ,
97+ } ,
9298 } ) ;
9399 }
94100
@@ -102,6 +108,9 @@ export class Project extends pulumi.ComponentResource {
102108 numberOfAvailabilityZones : 2 ,
103109 enableDnsHostnames : true ,
104110 enableDnsSupport : true ,
111+ tags : {
112+ Env : this . environment ,
113+ } ,
105114 } ,
106115 { parent : this } ,
107116 ) ;
@@ -133,7 +142,12 @@ export class Project extends pulumi.ComponentResource {
133142 private createWebServerPrerequisites ( ) {
134143 this . cluster = new aws . ecs . Cluster (
135144 `${ this . name } -cluster` ,
136- { name : this . name } ,
145+ {
146+ name : this . name ,
147+ tags : {
148+ Env : this . environment ,
149+ } ,
150+ } ,
137151 { parent : this } ,
138152 ) ;
139153 }
@@ -145,6 +159,9 @@ export class Project extends pulumi.ComponentResource {
145159 {
146160 ...databaseOptions ,
147161 vpc : this . vpc ,
162+ tags : {
163+ Env : this . environment ,
164+ } ,
148165 } ,
149166 { parent : this } ,
150167 ) ;
@@ -169,6 +186,9 @@ export class Project extends pulumi.ComponentResource {
169186 {
170187 ...staticSiteOptions ,
171188 hostedZoneId : this . hostedZoneId ,
189+ tags : {
190+ Env : this . environment ,
191+ } ,
172192 } ,
173193 { parent : this } ,
174194 ) ;
@@ -193,6 +213,9 @@ export class Project extends pulumi.ComponentResource {
193213 vpc : this . vpc ,
194214 hostedZoneId : this . hostedZoneId ,
195215 environment : parsedEnv ,
216+ tags : {
217+ Env : this . environment ,
218+ } ,
196219 } ,
197220 { parent : this } ,
198221 ) ;
0 commit comments