@@ -5,7 +5,6 @@ import { DatabaseInstance } from 'aws-cdk-lib/aws-rds';
55import { Bucket } from 'aws-cdk-lib/aws-s3' ;
66import { Construct } from 'constructs' ;
77import { AlbResources } from '../../internal/alb' ;
8- import { BastionHostResources } from '../../internal/bastion' ;
98import { ElastiCacheCluster } from '../../internal/ec' ;
109import { RdsInstance } from '../../internal/rds' ;
1110import { SecurityGroupResources } from '../../internal/sg' ;
@@ -40,6 +39,12 @@ export class AdHocBase extends Construct {
4039 const assetsBucket = new Bucket ( scope , 'AssetsBucket' , {
4140 bucketName : `${ props . domainName . replace ( '.' , '-' ) } -${ stackName } -assets-bucket` ,
4241 removalPolicy : RemovalPolicy . DESTROY ,
42+ blockPublicAccess : {
43+ blockPublicAcls : false ,
44+ blockPublicPolicy : false ,
45+ ignorePublicAcls : false ,
46+ restrictPublicBuckets : false ,
47+ } ,
4348 autoDeleteObjects : true ,
4449 } ) ;
4550 this . assetsBucket = assetsBucket ;
@@ -64,7 +69,6 @@ export class AdHocBase extends Construct {
6469 dbSecretName : this . node . tryGetContext ( 'config' ) ?. dbSecretName ?? 'DB_SECRET_NAME' ,
6570 } ) ;
6671 this . databaseInstance = rdsInstance . rdsInstance ;
67- const { dbInstanceEndpointAddress } = rdsInstance . rdsInstance ;
6872
6973 // elasticache cluster
7074 const elastiCacheCluster = new ElastiCacheCluster ( this , 'ElastiCacheCluster' , {
@@ -75,13 +79,5 @@ export class AdHocBase extends Construct {
7579 // get the elasticache cluster hostname
7680 this . elastiCacheHostname = elastiCacheCluster . elastiCacheHost ;
7781
78- // TODO: is this needed?
79- new BastionHostResources ( this , 'BastionHostResources' , {
80- appSecurityGroup,
81- vpc : this . vpc ,
82- rdsAddress : dbInstanceEndpointAddress ,
83- instanceClass : this . node . tryGetContext ( 'config' ) . instanceClass ,
84- // instanceType: this.node.tryGetContext('config').instanceType,
85- } ) ;
8682 }
8783}
0 commit comments