diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 942ce78..6d01058 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -45,6 +45,8 @@ jobs: TITILER_PGSTAC_API_CUSTOM_DOMAIN_NAME: ${{ vars.TITILER_PGSTAC_API_CUSTOM_DOMAIN_NAME }} USER_STAC_ITEM_GEN_ROLE_ARN: ${{ vars.USER_STAC_ITEM_GEN_ROLE_ARN }} USER_STAC_ALLOWED_PUBLISHER_ACCOUNT_BUCKET_PAIRS: ${{ vars.USER_STAC_ALLOWED_PUBLISHER_ACCOUNT_BUCKET_PAIRS }} + USER_STAC_STAC_API_CUSTOM_DOMAIN_NAME: ${{ vars.USER_STAC_STAC_API_CUSTOM_DOMAIN_NAME }} + USER_STAC_TITILER_PGSTAC_API_CUSTOM_DOMAIN_NAME: ${{ vars.USER_STAC_TITILER_PGSTAC_API_CUSTOM_DOMAIN_NAME }} WEB_ACL_ARN: ${{ vars.WEB_ACL_ARN }} steps: diff --git a/cdk/app.ts b/cdk/app.ts index 44376dc..c8faa0e 100644 --- a/cdk/app.ts +++ b/cdk/app.ts @@ -28,6 +28,8 @@ const { titilerPgStacApiCustomDomainName, userStacAllowedPublisherAccountBucketPairs, userStacItemGenRoleArn, + userStacStacApiCustomDomainName, + userStacTitilerPgStacApiCustomDomainName, version, webAclArn, } = new Config(); @@ -93,6 +95,7 @@ new PgStacInfra(app, buildStackName("userSTAC"), { stage, type: "internal", version, + certificateArn, webAclArn, loggingBucketArn: common.loggingBucket.bucketArn, pgstacDbConfig: { @@ -102,12 +105,12 @@ new PgStacInfra(app, buildStackName("userSTAC"), { subnetPublic: false, }, stacApiConfig: { - // customDomainName: stacApiCustomDomainName, + customDomainName: userStacStacApiCustomDomainName, }, titilerPgstacConfig: { mosaicHost, bucketsPath: "./titiler_buckets.yaml", - // customDomainName: titilerPgStacApiCustomDomainName, + customDomainName: userStacTitilerPgStacApiCustomDomainName, dataAccessRoleArn: titilerDataAccessRoleArn, }, // stacBrowserConfig: { diff --git a/cdk/config.ts b/cdk/config.ts index 678932e..427e3e9 100644 --- a/cdk/config.ts +++ b/cdk/config.ts @@ -22,6 +22,8 @@ export class Config { readonly webAclArn: string; readonly userStacItemGenRoleArn: string; readonly userStacAllowedPublisherAccountBucketPairs: Array<{accountId: string; bucketArn: string}> | undefined; + readonly userStacStacApiCustomDomainName: string | undefined; + readonly userStacTitilerPgStacApiCustomDomainName: string | undefined; constructor() { // These are required environment variables and cannot be undefined @@ -117,6 +119,8 @@ export class Config { this.pgstacVersion = process.env.PGSTAC_VERSION!; this.webAclArn = process.env.WEB_ACL_ARN!; this.userStacItemGenRoleArn = process.env.USER_STAC_ITEM_GEN_ROLE_ARN!; + this.userStacStacApiCustomDomainName = process.env.USER_STAC_STAC_API_CUSTOM_DOMAIN_NAME; + this.userStacTitilerPgStacApiCustomDomainName = process.env.USER_STAC_TITILER_PGSTAC_API_CUSTOM_DOMAIN_NAME; if (process.env.USER_STAC_ALLOWED_PUBLISHER_ACCOUNT_BUCKET_PAIRS) { try {