File tree Expand file tree Collapse file tree
packages/cdk-blue-green-container-deployment/src/lambdas Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ const getProperties = (
4949 autoRollbackOnEvents : props . AutoRollbackOnEvents ,
5050 deploymentConfigName : props . DeploymentConfigName ,
5151 arnForDeploymentGroup : props . ArnForDeploymentGroup ,
52- tags : props . Tags ,
52+ tags : props . Tags ?? [ ] ,
5353} ) ;
5454
5555export const handleCreate : OnCreateHandler = async ( event ) : Promise < ResourceHandlerReturn > => {
@@ -157,8 +157,8 @@ export const handleUpdate: OnUpdateHandler = async (event): Promise<ResourceHand
157157 } )
158158 . promise ( ) ;
159159
160- const newTagKeys : string [ ] = ( newProps . tags || [ ] ) . map ( ( t : any ) => t . Key ) ;
161- const removableTagKeys : string [ ] = ( oldProps . tags || [ ] ) . map ( ( t : any ) => t . Key ) . filter ( ( t ) => ! newTagKeys . includes ( t ) ) ;
160+ const newTagKeys : string [ ] = newProps . tags . map ( ( t : any ) => t . Key ) ;
161+ const removableTagKeys : string [ ] = oldProps . tags . map ( ( t : any ) => t . Key ) . filter ( ( t ) => ! newTagKeys . includes ( t ) ) ;
162162
163163 if ( removableTagKeys . length > 0 ) {
164164 await codeDeploy
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ const getProperties = (props: CloudFormationCustomResourceEvent['ResourcePropert
5151 healthCheckGracePeriodSeconds : props . HealthCheckGracePeriodSeconds ,
5252 deploymentConfiguration : props . DeploymentConfiguration ,
5353 propagateTags : props . PropagateTags ,
54- tags : props . Tags ,
54+ tags : props . Tags ?? [ ] ,
5555} ) ;
5656
5757export const handleCreate : OnCreateHandler = async ( event ) : Promise < ResourceHandlerReturn > => {
You can’t perform that action at this time.
0 commit comments