@@ -40,7 +40,7 @@ export class BackendStack extends cdk.Stack {
4040 } ) ;
4141
4242 // CloudMap Namespace for service discovery
43- const namespace = cluster . addDefaultCloudMapNamespace ( {
43+ cluster . addDefaultCloudMapNamespace ( {
4444 name : `${ appName . toLowerCase ( ) } .local` ,
4545 } ) ;
4646
@@ -138,18 +138,24 @@ export class BackendStack extends cdk.Stack {
138138 reportsTable . grantReadWriteData ( taskDefinition . taskRole ) ;
139139
140140 // Create a secrets manager for the SSL certificate and key
141- const certificateSecret = new cdk . aws_secretsmanager . Secret ( this , `${ appName } CertSecret-${ props . environment } ` , {
142- secretName : `${ appName } /ssl-cert-${ props . environment } ` ,
143- description : 'SSL certificate and private key for HTTPS' ,
144- generateSecretString : {
145- secretStringTemplate : JSON . stringify ( {
146- // You'll need to populate these values after deployment
147- certificate : '-----BEGIN CERTIFICATE-----\nYour certificate here\n-----END CERTIFICATE-----' ,
148- privateKey : '-----BEGIN PRIVATE KEY-----\nYour private key here\n-----END PRIVATE KEY-----'
149- } ) ,
150- generateStringKey : 'dummy' // This key won't be used but is required
141+ const certificateSecret = new cdk . aws_secretsmanager . Secret (
142+ this ,
143+ `${ appName } CertSecret-${ props . environment } ` ,
144+ {
145+ secretName : `${ appName } /ssl-cert-${ props . environment } ` ,
146+ description : 'SSL certificate and private key for HTTPS' ,
147+ generateSecretString : {
148+ secretStringTemplate : JSON . stringify ( {
149+ // You'll need to populate these values after deployment
150+ certificate :
151+ '-----BEGIN CERTIFICATE-----\nYour certificate here\n-----END CERTIFICATE-----' ,
152+ privateKey :
153+ '-----BEGIN PRIVATE KEY-----\nYour private key here\n-----END PRIVATE KEY-----' ,
154+ } ) ,
155+ generateStringKey : 'dummy' , // This key won't be used but is required
156+ } ,
151157 } ,
152- } ) ;
158+ ) ;
153159
154160 // Container
155161 const container = taskDefinition . addContainer ( `${ appName } Container-${ props . environment } ` , {
@@ -328,8 +334,12 @@ export class BackendStack extends cdk.Stack {
328334 const executionRole = new iam . Role ( this , `${ appName } APIGatewayVPCRole-${ props . environment } ` , {
329335 assumedBy : new iam . ServicePrincipal ( 'apigateway.amazonaws.com' ) ,
330336 managedPolicies : [
331- iam . ManagedPolicy . fromAwsManagedPolicyName ( 'service-role/AmazonAPIGatewayPushToCloudWatchLogs' ) ,
332- iam . ManagedPolicy . fromAwsManagedPolicyName ( 'AmazonVPCCrossAccountNetworkInterfaceOperations' ) ,
337+ iam . ManagedPolicy . fromAwsManagedPolicyName (
338+ 'service-role/AmazonAPIGatewayPushToCloudWatchLogs' ,
339+ ) ,
340+ iam . ManagedPolicy . fromAwsManagedPolicyName (
341+ 'AmazonVPCCrossAccountNetworkInterfaceOperations' ,
342+ ) ,
333343 ] ,
334344 } ) ;
335345
0 commit comments