Skip to content

Commit

Permalink
test to fix deployment : try adding s3 endpoint and force allow publi…
Browse files Browse the repository at this point in the history
…c subnet
  • Loading branch information
emileten committed Feb 21, 2024
1 parent 92b4bf9 commit 97b5a32
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion integration_tests/cdk/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppConfig(BaseSettings):
description="AWS account ID"
)
project_id: str = pydantic.Field(
description="Project ID", default="eoapi-cdk-integration"
description="Project ID", default="eoapi-cdk"
)
stage: str = pydantic.Field(description="Stage of deployment", default="test")
# because of its validator, `tags` should always come after `project_id` and `stage`
Expand Down
4 changes: 4 additions & 0 deletions integration_tests/cdk/eoapi_template/vpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ def __init__(self, scope: Construct, app_config: AppConfig, **kwargs) -> None:
"CloudWatchEndpoint",
service=aws_ec2.InterfaceVpcEndpointAwsService.CLOUDWATCH_LOGS,
)

self.vpc.add_gateway_endpoint(
"S3", service=aws_ec2.GatewayVpcEndpointAwsService.S3
)

self.export_value(
self.vpc.select_subnets(subnet_type=aws_ec2.SubnetType.PUBLIC)
Expand Down
3 changes: 2 additions & 1 deletion lib/database/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ export class PgStacDatabase extends Construct {
// overwrites defaults with user-provided configurable properties
...props.bootstrapperLambdaFunctionOptions,
// Non configurable properties that are going to be overwritten even if provided by the user
vpc: hasVpc(this.db) ? this.db.vpc : props.vpc
vpc: hasVpc(this.db) ? this.db.vpc : props.vpc,
allowPublicSubnet: true,
});

this.pgstacSecret = new secretsmanager.Secret(this, "bootstrappersecret", {
Expand Down

0 comments on commit 97b5a32

Please sign in to comment.