Skip to content

Commit cf58201

Browse files
authored
chore: add custom domain name configuration support
NASA-IMPACT/active-maap-sprint#1320
2 parents 58df1d6 + 663efca commit cf58201

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ jobs:
4545
TITILER_PGSTAC_API_CUSTOM_DOMAIN_NAME: ${{ vars.TITILER_PGSTAC_API_CUSTOM_DOMAIN_NAME }}
4646
USER_STAC_ITEM_GEN_ROLE_ARN: ${{ vars.USER_STAC_ITEM_GEN_ROLE_ARN }}
4747
USER_STAC_ALLOWED_PUBLISHER_ACCOUNT_BUCKET_PAIRS: ${{ vars.USER_STAC_ALLOWED_PUBLISHER_ACCOUNT_BUCKET_PAIRS }}
48+
USER_STAC_STAC_API_CUSTOM_DOMAIN_NAME: ${{ vars.USER_STAC_STAC_API_CUSTOM_DOMAIN_NAME }}
49+
USER_STAC_TITILER_PGSTAC_API_CUSTOM_DOMAIN_NAME: ${{ vars.USER_STAC_TITILER_PGSTAC_API_CUSTOM_DOMAIN_NAME }}
4850
WEB_ACL_ARN: ${{ vars.WEB_ACL_ARN }}
4951

5052
steps:

cdk/app.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ const {
2828
titilerPgStacApiCustomDomainName,
2929
userStacAllowedPublisherAccountBucketPairs,
3030
userStacItemGenRoleArn,
31+
userStacStacApiCustomDomainName,
32+
userStacTitilerPgStacApiCustomDomainName,
3133
version,
3234
webAclArn,
3335
} = new Config();
@@ -93,6 +95,7 @@ new PgStacInfra(app, buildStackName("userSTAC"), {
9395
stage,
9496
type: "internal",
9597
version,
98+
certificateArn,
9699
webAclArn,
97100
loggingBucketArn: common.loggingBucket.bucketArn,
98101
pgstacDbConfig: {
@@ -102,12 +105,12 @@ new PgStacInfra(app, buildStackName("userSTAC"), {
102105
subnetPublic: false,
103106
},
104107
stacApiConfig: {
105-
// customDomainName: stacApiCustomDomainName,
108+
customDomainName: userStacStacApiCustomDomainName,
106109
},
107110
titilerPgstacConfig: {
108111
mosaicHost,
109112
bucketsPath: "./titiler_buckets.yaml",
110-
// customDomainName: titilerPgStacApiCustomDomainName,
113+
customDomainName: userStacTitilerPgStacApiCustomDomainName,
111114
dataAccessRoleArn: titilerDataAccessRoleArn,
112115
},
113116
// stacBrowserConfig: {

cdk/config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ export class Config {
2222
readonly webAclArn: string;
2323
readonly userStacItemGenRoleArn: string;
2424
readonly userStacAllowedPublisherAccountBucketPairs: Array<{accountId: string; bucketArn: string}> | undefined;
25+
readonly userStacStacApiCustomDomainName: string | undefined;
26+
readonly userStacTitilerPgStacApiCustomDomainName: string | undefined;
2527

2628
constructor() {
2729
// These are required environment variables and cannot be undefined
@@ -117,6 +119,8 @@ export class Config {
117119
this.pgstacVersion = process.env.PGSTAC_VERSION!;
118120
this.webAclArn = process.env.WEB_ACL_ARN!;
119121
this.userStacItemGenRoleArn = process.env.USER_STAC_ITEM_GEN_ROLE_ARN!;
122+
this.userStacStacApiCustomDomainName = process.env.USER_STAC_STAC_API_CUSTOM_DOMAIN_NAME;
123+
this.userStacTitilerPgStacApiCustomDomainName = process.env.USER_STAC_TITILER_PGSTAC_API_CUSTOM_DOMAIN_NAME;
120124

121125
if (process.env.USER_STAC_ALLOWED_PUBLISHER_ACCOUNT_BUCKET_PAIRS) {
122126
try {

0 commit comments

Comments
 (0)