@infoxchange/make-it-so-sst-v2 1.0.0-internal-testing-disambiguate-release-id-bc6e5bb.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +16 -0
- package/LICENSE +21 -0
- package/README.md +377 -0
- package/commitlint.config.ts +14 -0
- package/dist/cdk-constructs/IxApi.d.ts +12 -0
- package/dist/cdk-constructs/IxApi.d.ts.map +1 -0
- package/dist/cdk-constructs/IxApi.js +56 -0
- package/dist/cdk-constructs/IxBucket.d.ts +9 -0
- package/dist/cdk-constructs/IxBucket.d.ts.map +1 -0
- package/dist/cdk-constructs/IxBucket.js +22 -0
- package/dist/cdk-constructs/IxCertificate.d.ts +16 -0
- package/dist/cdk-constructs/IxCertificate.d.ts.map +1 -0
- package/dist/cdk-constructs/IxCertificate.js +26 -0
- package/dist/cdk-constructs/IxDnsRecord.d.ts +23 -0
- package/dist/cdk-constructs/IxDnsRecord.d.ts.map +1 -0
- package/dist/cdk-constructs/IxDnsRecord.js +43 -0
- package/dist/cdk-constructs/IxElasticache.d.ts +17 -0
- package/dist/cdk-constructs/IxElasticache.d.ts.map +1 -0
- package/dist/cdk-constructs/IxElasticache.js +70 -0
- package/dist/cdk-constructs/IxNextjsSite.d.ts +16 -0
- package/dist/cdk-constructs/IxNextjsSite.d.ts.map +1 -0
- package/dist/cdk-constructs/IxNextjsSite.js +38 -0
- package/dist/cdk-constructs/IxQuicksightWorkspace.d.ts +17 -0
- package/dist/cdk-constructs/IxQuicksightWorkspace.d.ts.map +1 -0
- package/dist/cdk-constructs/IxQuicksightWorkspace.js +29 -0
- package/dist/cdk-constructs/IxSESIdentity.d.ts +12 -0
- package/dist/cdk-constructs/IxSESIdentity.d.ts.map +1 -0
- package/dist/cdk-constructs/IxSESIdentity.js +45 -0
- package/dist/cdk-constructs/IxStaticSite.d.ts +17 -0
- package/dist/cdk-constructs/IxStaticSite.d.ts.map +1 -0
- package/dist/cdk-constructs/IxStaticSite.js +38 -0
- package/dist/cdk-constructs/IxVpcDetails.d.ts +12 -0
- package/dist/cdk-constructs/IxVpcDetails.d.ts.map +1 -0
- package/dist/cdk-constructs/IxVpcDetails.js +26 -0
- package/dist/cdk-constructs/IxWebsiteRedirect.d.ts +35 -0
- package/dist/cdk-constructs/IxWebsiteRedirect.d.ts.map +1 -0
- package/dist/cdk-constructs/IxWebsiteRedirect.js +72 -0
- package/dist/cdk-constructs/SiteOidcAuth/auth-check-handler-body.d.ts +2 -0
- package/dist/cdk-constructs/SiteOidcAuth/auth-check-handler-body.d.ts.map +1 -0
- package/dist/cdk-constructs/SiteOidcAuth/auth-check-handler-body.js +130 -0
- package/dist/cdk-constructs/SiteOidcAuth/auth-route.d.ts +2 -0
- package/dist/cdk-constructs/SiteOidcAuth/auth-route.d.ts.map +1 -0
- package/dist/cdk-constructs/SiteOidcAuth/auth-route.js +59 -0
- package/dist/cdk-constructs/SiteOidcAuth/index.d.ts +197 -0
- package/dist/cdk-constructs/SiteOidcAuth/index.d.ts.map +1 -0
- package/dist/cdk-constructs/SiteOidcAuth/index.js +188 -0
- package/dist/cdk-constructs/index.d.ts +11 -0
- package/dist/cdk-constructs/index.d.ts.map +1 -0
- package/dist/cdk-constructs/index.js +10 -0
- package/dist/deployConfig.d.ts +72 -0
- package/dist/deployConfig.d.ts.map +1 -0
- package/dist/deployConfig.js +78 -0
- package/dist/lib/auth/index.d.ts +2 -0
- package/dist/lib/auth/index.d.ts.map +1 -0
- package/dist/lib/auth/index.js +1 -0
- package/dist/lib/auth/oidc.d.ts +26 -0
- package/dist/lib/auth/oidc.d.ts.map +1 -0
- package/dist/lib/auth/oidc.js +48 -0
- package/dist/lib/proxy/fetch.d.ts +4 -0
- package/dist/lib/proxy/fetch.d.ts.map +1 -0
- package/dist/lib/proxy/fetch.js +31 -0
- package/dist/lib/proxy/index.d.ts +2 -0
- package/dist/lib/proxy/index.d.ts.map +1 -0
- package/dist/lib/proxy/index.js +1 -0
- package/dist/lib/site/support.d.ts +71 -0
- package/dist/lib/site/support.d.ts.map +1 -0
- package/dist/lib/site/support.js +262 -0
- package/dist/lib/utils/hash.d.ts +2 -0
- package/dist/lib/utils/hash.d.ts.map +1 -0
- package/dist/lib/utils/hash.js +13 -0
- package/dist/lib/utils/objects.d.ts +4 -0
- package/dist/lib/utils/objects.d.ts.map +1 -0
- package/dist/lib/utils/objects.js +7 -0
- package/eslint.config.js +11 -0
- package/package.json +66 -0
- package/src/cdk-constructs/IxApi.ts +81 -0
- package/src/cdk-constructs/IxBucket.ts +35 -0
- package/src/cdk-constructs/IxCertificate.ts +54 -0
- package/src/cdk-constructs/IxDnsRecord.ts +79 -0
- package/src/cdk-constructs/IxElasticache.ts +106 -0
- package/src/cdk-constructs/IxNextjsSite.ts +72 -0
- package/src/cdk-constructs/IxQuicksightWorkspace.ts +54 -0
- package/src/cdk-constructs/IxSESIdentity.ts +70 -0
- package/src/cdk-constructs/IxStaticSite.ts +69 -0
- package/src/cdk-constructs/IxVpcDetails.ts +38 -0
- package/src/cdk-constructs/IxWebsiteRedirect.ts +133 -0
- package/src/cdk-constructs/SiteOidcAuth/auth-check-handler-body.ts +168 -0
- package/src/cdk-constructs/SiteOidcAuth/auth-route.ts +71 -0
- package/src/cdk-constructs/SiteOidcAuth/index.ts +299 -0
- package/src/cdk-constructs/index.ts +10 -0
- package/src/deployConfig.ts +87 -0
- package/src/lib/auth/index.ts +1 -0
- package/src/lib/auth/oidc.ts +73 -0
- package/src/lib/proxy/fetch.ts +41 -0
- package/src/lib/proxy/index.ts +1 -0
- package/src/lib/site/support.ts +439 -0
- package/src/lib/utils/hash.ts +14 -0
- package/src/lib/utils/objects.ts +19 -0
- package/tsconfig.json +9 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Construct } from "constructs";
|
|
2
|
+
import { StringParameter } from "aws-cdk-lib/aws-ssm";
|
|
3
|
+
import { CustomResource } from "aws-cdk-lib";
|
|
4
|
+
import { remapKeys } from "../lib/utils/objects.js";
|
|
5
|
+
export class IxDnsRecord extends Construct {
|
|
6
|
+
constructor(scope, id, props) {
|
|
7
|
+
super(scope, id);
|
|
8
|
+
this.createDnsRecord(scope, id, props);
|
|
9
|
+
}
|
|
10
|
+
createDnsRecord(scope, id, constructProps) {
|
|
11
|
+
const dnsRecordUpdaterLambdaArn = StringParameter.valueForStringParameter(scope, "/shared-services/route53/lambdaArn");
|
|
12
|
+
const keysMap = {
|
|
13
|
+
name: "RecordFQDN",
|
|
14
|
+
value: "RecordValue",
|
|
15
|
+
ttl: "RecordTTL",
|
|
16
|
+
hostedZoneId: "HostedZoneId",
|
|
17
|
+
type: "RecordType",
|
|
18
|
+
aliasZoneId: "AliasZoneId",
|
|
19
|
+
};
|
|
20
|
+
let lambdaProps;
|
|
21
|
+
if (constructProps.type === "TXT") {
|
|
22
|
+
lambdaProps = remapKeys({
|
|
23
|
+
...constructProps,
|
|
24
|
+
value: `"${constructProps.value}"`,
|
|
25
|
+
}, keysMap);
|
|
26
|
+
}
|
|
27
|
+
else if (constructProps.type === "MX") {
|
|
28
|
+
const { priority, ...rest } = constructProps;
|
|
29
|
+
lambdaProps = remapKeys({
|
|
30
|
+
...rest,
|
|
31
|
+
value: `${priority} ${rest.value}`,
|
|
32
|
+
}, keysMap);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
lambdaProps = remapKeys(constructProps, keysMap);
|
|
36
|
+
}
|
|
37
|
+
new CustomResource(scope, id + "-CertificateCustomResource", {
|
|
38
|
+
resourceType: "Custom::DNSRecordUpdaterLambda",
|
|
39
|
+
serviceToken: dnsRecordUpdaterLambdaArn,
|
|
40
|
+
properties: lambdaProps,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Construct } from "constructs";
|
|
2
|
+
import { CfnCacheCluster } from "aws-cdk-lib/aws-elasticache";
|
|
3
|
+
import { IVpc } from "aws-cdk-lib/aws-ec2";
|
|
4
|
+
type ConstructScope = ConstructorParameters<typeof Construct>[0];
|
|
5
|
+
type ConstructId = ConstructorParameters<typeof Construct>[1];
|
|
6
|
+
type CacheClusterProps = ConstructorParameters<typeof CfnCacheCluster>[2];
|
|
7
|
+
type Props = CacheClusterProps & {
|
|
8
|
+
vpc?: IVpc;
|
|
9
|
+
vpcSubnetIds?: string[];
|
|
10
|
+
};
|
|
11
|
+
export declare class IxElasticache extends Construct {
|
|
12
|
+
cluster: CfnCacheCluster;
|
|
13
|
+
connectionString: string;
|
|
14
|
+
constructor(scope: ConstructScope, id: ConstructId, { vpc, vpcSubnetIds, ...elasticacheProps }: Props);
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=IxElasticache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IxElasticache.d.ts","sourceRoot":"","sources":["../../src/cdk-constructs/IxElasticache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,eAAe,EAAkB,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,IAAI,EAA6B,MAAM,qBAAqB,CAAC;AAMtE,KAAK,cAAc,GAAG,qBAAqB,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AACjE,KAAK,WAAW,GAAG,qBAAqB,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9D,KAAK,iBAAiB,GAAG,qBAAqB,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAE1E,KAAK,KAAK,GAAG,iBAAiB,GAAG;IAC/B,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAEF,qBAAa,aAAc,SAAQ,SAAS;IAC1C,OAAO,EAAE,eAAe,CAAC;IAEzB,gBAAgB,EAAE,MAAM,CAAC;gBAGvB,KAAK,EAAE,cAAc,EACrB,EAAE,EAAE,WAAW,EACf,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,gBAAgB,EAAE,EAAE,KAAK;CAgFpD"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Construct } from "constructs";
|
|
2
|
+
import { CfnCacheCluster, CfnSubnetGroup } from "aws-cdk-lib/aws-elasticache";
|
|
3
|
+
import { SecurityGroup, Peer, Port } from "aws-cdk-lib/aws-ec2";
|
|
4
|
+
import { StringParameter } from "aws-cdk-lib/aws-ssm";
|
|
5
|
+
import { Stack } from "aws-cdk-lib";
|
|
6
|
+
import { IxVpcDetails } from "./IxVpcDetails.js";
|
|
7
|
+
import deployConfig from "../deployConfig.js";
|
|
8
|
+
export class IxElasticache extends Construct {
|
|
9
|
+
cluster;
|
|
10
|
+
connectionString;
|
|
11
|
+
constructor(scope, id, { vpc, vpcSubnetIds, ...elasticacheProps }) {
|
|
12
|
+
super(scope, id);
|
|
13
|
+
// Setup cluster name
|
|
14
|
+
if (!elasticacheProps.clusterName && deployConfig.isIxDeploy) {
|
|
15
|
+
elasticacheProps.clusterName = `${Stack.of(this).stackName}`;
|
|
16
|
+
}
|
|
17
|
+
if (!elasticacheProps.cacheSubnetGroupName) {
|
|
18
|
+
// Setup VPC
|
|
19
|
+
if (!vpc && deployConfig.isIxDeploy) {
|
|
20
|
+
const vpcDetails = new IxVpcDetails(scope, id + "-IxVpcDetails");
|
|
21
|
+
vpc = vpcDetails.vpc;
|
|
22
|
+
}
|
|
23
|
+
// Setup VPC subnets
|
|
24
|
+
if (vpc && !vpcSubnetIds) {
|
|
25
|
+
if (deployConfig.isIxDeploy) {
|
|
26
|
+
vpcSubnetIds = IxVpcDetails.getVpcSubnetIds(scope);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
vpcSubnetIds = vpc.privateSubnets.map((subnet) => subnet.subnetId);
|
|
30
|
+
if (!vpcSubnetIds.length) {
|
|
31
|
+
throw Error(`The vpc ${vpc.vpcId} has no private subnets.`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
// Setup cluster security group
|
|
37
|
+
if (vpc && vpcSubnetIds) {
|
|
38
|
+
const subnetGroup = new CfnSubnetGroup(scope, "ElasticacheSubnetGroup", {
|
|
39
|
+
subnetIds: vpcSubnetIds,
|
|
40
|
+
description: "Subnet group for redis",
|
|
41
|
+
});
|
|
42
|
+
elasticacheProps.cacheSubnetGroupName = subnetGroup.ref;
|
|
43
|
+
const namePrefix = elasticacheProps.clusterName
|
|
44
|
+
? elasticacheProps.clusterName
|
|
45
|
+
: `${Stack.of(this).stackName}`;
|
|
46
|
+
const securityGroup = new SecurityGroup(scope, "ElasticacheSecurityGroup", {
|
|
47
|
+
vpc,
|
|
48
|
+
allowAllOutbound: true,
|
|
49
|
+
description: "Security group for Elasticache Cluster",
|
|
50
|
+
securityGroupName: `${namePrefix}-elasticache`,
|
|
51
|
+
});
|
|
52
|
+
for (const subnetIndex of [1, 2, 3]) {
|
|
53
|
+
const cidr = StringParameter.valueForStringParameter(scope, `/vpc/subnet/private-${deployConfig.workloadGroup}/${subnetIndex}/cidr`);
|
|
54
|
+
securityGroup.addIngressRule(Peer.ipv4(cidr), Port.tcp(6379), `Allow access to Elasticache cluster from private ${deployConfig.workloadGroup} subnet`);
|
|
55
|
+
}
|
|
56
|
+
elasticacheProps.vpcSecurityGroupIds = [securityGroup.securityGroupId];
|
|
57
|
+
}
|
|
58
|
+
// Create Redis Cluster
|
|
59
|
+
this.cluster = new CfnCacheCluster(scope, "RedisCluster", elasticacheProps);
|
|
60
|
+
if (elasticacheProps.engine === "redis") {
|
|
61
|
+
this.connectionString = `redis://${this.cluster.attrRedisEndpointAddress}:${this.cluster.attrRedisEndpointPort}`;
|
|
62
|
+
}
|
|
63
|
+
else if (elasticacheProps.engine === "memcached") {
|
|
64
|
+
this.connectionString = `${this.cluster.attrConfigurationEndpointAddress}:${this.cluster.attrConfigurationEndpointPort}`;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
throw Error(`Unsupported engine: ${elasticacheProps.engine}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { NextjsSite } from "sst/constructs";
|
|
2
|
+
import { type ExtendedNextjsSiteProps } from "../lib/site/support.js";
|
|
3
|
+
type ConstructScope = ConstructorParameters<typeof NextjsSite>[0];
|
|
4
|
+
type ConstructId = ConstructorParameters<typeof NextjsSite>[1];
|
|
5
|
+
type ConstructProps = ExtendedNextjsSiteProps;
|
|
6
|
+
export declare class IxNextjsSite extends NextjsSite {
|
|
7
|
+
constructor(scope: ConstructScope, id: ConstructId, props?: ConstructProps);
|
|
8
|
+
get customDomains(): string[];
|
|
9
|
+
get primaryCustomDomain(): string | null;
|
|
10
|
+
get aliasDomain(): string | null;
|
|
11
|
+
get alternativeDomains(): string[];
|
|
12
|
+
get primaryDomain(): string | null;
|
|
13
|
+
get primaryOrigin(): string | null;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=IxNextjsSite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IxNextjsSite.d.ts","sourceRoot":"","sources":["../../src/cdk-constructs/IxNextjsSite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EACL,KAAK,uBAAuB,EAgB7B,MAAM,wBAAwB,CAAC;AAEhC,KAAK,cAAc,GAAG,qBAAqB,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAClE,KAAK,WAAW,GAAG,qBAAqB,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/D,KAAK,cAAc,GAAG,uBAAuB,CAAC;AAE9C,qBAAa,YAAa,SAAQ,UAAU;gBAExC,KAAK,EAAE,cAAc,EACrB,EAAE,EAAE,WAAW,EACf,KAAK,GAAE,cAAmB;IAmB5B,IAAW,aAAa,IAAI,MAAM,EAAE,CAEnC;IAED,IAAW,mBAAmB,IAAI,MAAM,GAAG,IAAI,CAE9C;IAED,IAAW,WAAW,IAAI,MAAM,GAAG,IAAI,CAEtC;IAED,IAAW,kBAAkB,IAAI,MAAM,EAAE,CAExC;IAED,IAAW,aAAa,IAAI,MAAM,GAAG,IAAI,CAExC;IAED,IAAW,aAAa,IAAI,MAAM,GAAG,IAAI,CAExC;CACF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { NextjsSite } from "sst/constructs";
|
|
2
|
+
import ixDeployConfig from "../deployConfig.js";
|
|
3
|
+
import { getAliasDomain, getAlternativeDomains, getCustomDomains, getPrimaryCustomDomain, getPrimaryDomain, getPrimaryOrigin, setupCertificate, setupCustomDomain, setupDnsRecords, setupDomainAliasRedirect, setupVpcDetails, setupDefaultEnvVars, applyConditionalEnvironmentVariables, parentCompatibleSsrProps, processAuthProps, } from "../lib/site/support.js";
|
|
4
|
+
export class IxNextjsSite extends NextjsSite {
|
|
5
|
+
constructor(scope, id, props = {}) {
|
|
6
|
+
if (ixDeployConfig.isIxDeploy) {
|
|
7
|
+
props = setupVpcDetails(scope, id, props);
|
|
8
|
+
props = setupCustomDomain(scope, id, props);
|
|
9
|
+
props = setupCertificate(scope, id, props);
|
|
10
|
+
props = setupDomainAliasRedirect(scope, id, props);
|
|
11
|
+
}
|
|
12
|
+
props = processAuthProps(scope, id, "SsrSite", props);
|
|
13
|
+
props = setupDefaultEnvVars(scope, id, props);
|
|
14
|
+
props = applyConditionalEnvironmentVariables(scope, id, props);
|
|
15
|
+
super(scope, id, parentCompatibleSsrProps(props));
|
|
16
|
+
if (ixDeployConfig.isIxDeploy) {
|
|
17
|
+
setupDnsRecords(this, scope, id, props);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
get customDomains() {
|
|
21
|
+
return getCustomDomains(this.props);
|
|
22
|
+
}
|
|
23
|
+
get primaryCustomDomain() {
|
|
24
|
+
return getPrimaryCustomDomain(this.props);
|
|
25
|
+
}
|
|
26
|
+
get aliasDomain() {
|
|
27
|
+
return getAliasDomain(this.props);
|
|
28
|
+
}
|
|
29
|
+
get alternativeDomains() {
|
|
30
|
+
return getAlternativeDomains(this.props);
|
|
31
|
+
}
|
|
32
|
+
get primaryDomain() {
|
|
33
|
+
return getPrimaryDomain(this, this.props);
|
|
34
|
+
}
|
|
35
|
+
get primaryOrigin() {
|
|
36
|
+
return getPrimaryOrigin(this, this.props);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Construct } from "constructs";
|
|
2
|
+
type ConstructScope = ConstructorParameters<typeof Construct>[0];
|
|
3
|
+
type ConstructId = ConstructorParameters<typeof Construct>[1];
|
|
4
|
+
type Props = {
|
|
5
|
+
appName: string;
|
|
6
|
+
dataBuckets: string[];
|
|
7
|
+
};
|
|
8
|
+
export declare class IxQuicksightWorkspace extends Construct {
|
|
9
|
+
workspaceBucketName: string;
|
|
10
|
+
athenaWorkgroupName: string;
|
|
11
|
+
serviceRoleArn: string;
|
|
12
|
+
glueDatabaseName: string;
|
|
13
|
+
quickSightDataSourceId: string;
|
|
14
|
+
constructor(scope: ConstructScope, id: ConstructId, props: Props);
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=IxQuicksightWorkspace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IxQuicksightWorkspace.d.ts","sourceRoot":"","sources":["../../src/cdk-constructs/IxQuicksightWorkspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAIvC,KAAK,cAAc,GAAG,qBAAqB,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AACjE,KAAK,WAAW,GAAG,qBAAqB,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9D,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,qBAAa,qBAAsB,SAAQ,SAAS;IAClD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,sBAAsB,EAAE,MAAM,CAAC;gBAEnB,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK;CAkCjE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Construct } from "constructs";
|
|
2
|
+
import { StringParameter } from "aws-cdk-lib/aws-ssm";
|
|
3
|
+
import { CustomResource } from "aws-cdk-lib";
|
|
4
|
+
export class IxQuicksightWorkspace extends Construct {
|
|
5
|
+
workspaceBucketName;
|
|
6
|
+
athenaWorkgroupName;
|
|
7
|
+
serviceRoleArn;
|
|
8
|
+
glueDatabaseName;
|
|
9
|
+
quickSightDataSourceId;
|
|
10
|
+
constructor(scope, id, props) {
|
|
11
|
+
super(scope, id);
|
|
12
|
+
const qsWorkspaceSetupLambdaArn = StringParameter.valueForStringParameter(scope, "/shared-services/quicksight-workspace/lambdaArn");
|
|
13
|
+
const quicksightWorkspaceLambda = new CustomResource(scope, id + "-CustomResource", {
|
|
14
|
+
resourceType: "Custom::QuicksightWorkspace",
|
|
15
|
+
serviceToken: qsWorkspaceSetupLambdaArn,
|
|
16
|
+
properties: {
|
|
17
|
+
app_name: props.appName,
|
|
18
|
+
data_buckets: props.dataBuckets,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
this.workspaceBucketName = quicksightWorkspaceLambda.getAttString("WorkspaceBucketName");
|
|
22
|
+
this.athenaWorkgroupName = quicksightWorkspaceLambda.getAttString("AthenaWorkgroupName");
|
|
23
|
+
this.serviceRoleArn =
|
|
24
|
+
quicksightWorkspaceLambda.getAttString("ServiceRoleArn");
|
|
25
|
+
this.glueDatabaseName =
|
|
26
|
+
quicksightWorkspaceLambda.getAttString("GlueDatabaseName");
|
|
27
|
+
this.quickSightDataSourceId = quicksightWorkspaceLambda.getAttString("QuickSightDataSourceId");
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Construct } from "constructs";
|
|
2
|
+
type ConstructScope = ConstructorParameters<typeof Construct>[0];
|
|
3
|
+
type ConstructId = ConstructorParameters<typeof Construct>[1];
|
|
4
|
+
type Props = {
|
|
5
|
+
domain: string;
|
|
6
|
+
mailFromSubdomain?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare class IxSESIdentity extends Construct {
|
|
9
|
+
constructor(scope: ConstructScope, id: ConstructId, props: Props);
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=IxSESIdentity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IxSESIdentity.d.ts","sourceRoot":"","sources":["../../src/cdk-constructs/IxSESIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAKvC,KAAK,cAAc,GAAG,qBAAqB,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AACjE,KAAK,WAAW,GAAG,qBAAqB,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9D,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,qBAAa,aAAc,SAAQ,SAAS;gBAC9B,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK;CAuDjE"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Construct } from "constructs";
|
|
2
|
+
import { IxDnsRecord } from "./IxDnsRecord.js";
|
|
3
|
+
import * as ses from "aws-cdk-lib/aws-ses";
|
|
4
|
+
import * as cdk from "aws-cdk-lib";
|
|
5
|
+
export class IxSESIdentity extends Construct {
|
|
6
|
+
constructor(scope, id, props) {
|
|
7
|
+
const domain = props.domain.includes("@")
|
|
8
|
+
? props.domain.split("@")[1]
|
|
9
|
+
: props.domain;
|
|
10
|
+
const mailFromDomain = `${props.mailFromSubdomain ?? "mail"}.${domain}`;
|
|
11
|
+
super(scope, id);
|
|
12
|
+
const identity = new ses.EmailIdentity(scope, `${id}EmailIdentity`, {
|
|
13
|
+
identity: ses.Identity.domain(domain),
|
|
14
|
+
mailFromDomain,
|
|
15
|
+
});
|
|
16
|
+
// Based on https://github.com/aws/aws-cdk/blob/e2ef65a26c833ecb4a29c22e070c3c5f01c31995/packages/aws-cdk-lib/aws-ses/lib/email-identity.ts#L247
|
|
17
|
+
for (const i of [1, 2, 3]) {
|
|
18
|
+
new IxDnsRecord(scope, `${id}DkimDnsToken${i}`, {
|
|
19
|
+
type: "CNAME",
|
|
20
|
+
name: identity[`dkimDnsTokenName${i}`],
|
|
21
|
+
value: identity[`dkimDnsTokenValue${i}`],
|
|
22
|
+
ttl: 1800,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
// Based on
|
|
26
|
+
// https://github.com/aws/aws-cdk/blob/e2ef65a26c833ecb4a29c22e070c3c5f01c31995/packages/aws-cdk-lib/aws-ses/lib/email-identity.ts#L512
|
|
27
|
+
new IxDnsRecord(scope, `${id}MailFromMxRecord`, {
|
|
28
|
+
type: "MX",
|
|
29
|
+
name: mailFromDomain,
|
|
30
|
+
value: `feedback-smtp.${cdk.Stack.of(scope).region}.amazonses.com`,
|
|
31
|
+
priority: 10,
|
|
32
|
+
});
|
|
33
|
+
new IxDnsRecord(scope, `${id}MailFromTxtRecord`, {
|
|
34
|
+
type: "TXT",
|
|
35
|
+
name: mailFromDomain,
|
|
36
|
+
value: "v=spf1 include:amazonses.com ~all",
|
|
37
|
+
});
|
|
38
|
+
// Set up DMARC record
|
|
39
|
+
new IxDnsRecord(scope, `${id}DMARC`, {
|
|
40
|
+
type: "TXT",
|
|
41
|
+
name: `_dmarc.${domain}`,
|
|
42
|
+
value: "v=DMARC1; p=none;",
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StaticSite } from "sst/constructs";
|
|
2
|
+
import { ExtendedStaticSiteProps } from "../lib/site/support.js";
|
|
3
|
+
type ConstructScope = ConstructorParameters<typeof StaticSite>[0];
|
|
4
|
+
type ConstructId = ConstructorParameters<typeof StaticSite>[1];
|
|
5
|
+
type ConstructProps = ExtendedStaticSiteProps;
|
|
6
|
+
export declare class IxStaticSite extends StaticSite {
|
|
7
|
+
private propsExtended;
|
|
8
|
+
constructor(scope: ConstructScope, id: ConstructId, props?: ConstructProps);
|
|
9
|
+
get customDomains(): string[];
|
|
10
|
+
get primaryCustomDomain(): string | null;
|
|
11
|
+
get aliasDomain(): string | null;
|
|
12
|
+
get alternativeDomains(): string[];
|
|
13
|
+
get primaryDomain(): string | null;
|
|
14
|
+
get primaryOrigin(): string | null;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=IxStaticSite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IxStaticSite.d.ts","sourceRoot":"","sources":["../../src/cdk-constructs/IxStaticSite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EACL,uBAAuB,EAYxB,MAAM,wBAAwB,CAAC;AAEhC,KAAK,cAAc,GAAG,qBAAqB,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAClE,KAAK,WAAW,GAAG,qBAAqB,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/D,KAAK,cAAc,GAAG,uBAAuB,CAAC;AAE9C,qBAAa,YAAa,SAAQ,UAAU;IAE1C,OAAO,CAAC,aAAa,CAAiB;gBAGpC,KAAK,EAAE,cAAc,EACrB,EAAE,EAAE,WAAW,EACf,KAAK,GAAE,cAAmB;IAiB5B,IAAW,aAAa,IAAI,MAAM,EAAE,CAEnC;IAED,IAAW,mBAAmB,IAAI,MAAM,GAAG,IAAI,CAE9C;IAED,IAAW,WAAW,IAAI,MAAM,GAAG,IAAI,CAEtC;IAED,IAAW,kBAAkB,IAAI,MAAM,EAAE,CAExC;IAED,IAAW,aAAa,IAAI,MAAM,GAAG,IAAI,CAExC;IAED,IAAW,aAAa,IAAI,MAAM,GAAG,IAAI,CAExC;CACF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { StaticSite } from "sst/constructs";
|
|
2
|
+
import ixDeployConfig from "../deployConfig.js";
|
|
3
|
+
import { getAliasDomain, getAlternativeDomains, getCustomDomains, getPrimaryCustomDomain, getPrimaryDomain, getPrimaryOrigin, processAuthProps, setupCertificate, setupCustomDomain, setupDnsRecords, setupDomainAliasRedirect, } from "../lib/site/support.js";
|
|
4
|
+
export class IxStaticSite extends StaticSite {
|
|
5
|
+
// StaticSite's props are private, so we need to store them separately
|
|
6
|
+
propsExtended;
|
|
7
|
+
constructor(scope, id, props = {}) {
|
|
8
|
+
if (ixDeployConfig.isIxDeploy) {
|
|
9
|
+
props = setupCustomDomain(scope, id, props);
|
|
10
|
+
props = setupCertificate(scope, id, props);
|
|
11
|
+
props = setupDomainAliasRedirect(scope, id, props);
|
|
12
|
+
}
|
|
13
|
+
props = processAuthProps(scope, id, "StaticSite", props);
|
|
14
|
+
super(scope, id, props);
|
|
15
|
+
this.propsExtended = props;
|
|
16
|
+
if (ixDeployConfig.isIxDeploy) {
|
|
17
|
+
setupDnsRecords(this, scope, id, props);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
get customDomains() {
|
|
21
|
+
return getCustomDomains(this.propsExtended);
|
|
22
|
+
}
|
|
23
|
+
get primaryCustomDomain() {
|
|
24
|
+
return getPrimaryCustomDomain(this.propsExtended);
|
|
25
|
+
}
|
|
26
|
+
get aliasDomain() {
|
|
27
|
+
return getAliasDomain(this.propsExtended);
|
|
28
|
+
}
|
|
29
|
+
get alternativeDomains() {
|
|
30
|
+
return getAlternativeDomains(this.propsExtended);
|
|
31
|
+
}
|
|
32
|
+
get primaryDomain() {
|
|
33
|
+
return getPrimaryDomain(this, this.propsExtended);
|
|
34
|
+
}
|
|
35
|
+
get primaryOrigin() {
|
|
36
|
+
return getPrimaryOrigin(this, this.propsExtended);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Construct } from "constructs";
|
|
2
|
+
import { IVpc } from "aws-cdk-lib/aws-ec2";
|
|
3
|
+
type ConstructScope = ConstructorParameters<typeof Construct>[0];
|
|
4
|
+
type ConstructId = ConstructorParameters<typeof Construct>[1];
|
|
5
|
+
export declare class IxVpcDetails extends Construct {
|
|
6
|
+
vpc: IVpc;
|
|
7
|
+
constructor(scope: ConstructScope, id: ConstructId);
|
|
8
|
+
private getVpc;
|
|
9
|
+
static getVpcSubnetIds(scope: ConstructScope): Array<string>;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=IxVpcDetails.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IxVpcDetails.d.ts","sourceRoot":"","sources":["../../src/cdk-constructs/IxVpcDetails.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAO,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAGhD,KAAK,cAAc,GAAG,qBAAqB,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AACjE,KAAK,WAAW,GAAG,qBAAqB,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9D,qBAAa,YAAa,SAAQ,SAAS;IAClC,GAAG,EAAE,IAAI,CAAC;gBAEL,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,WAAW;IAKlD,OAAO,CAAC,MAAM;IAad,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,cAAc,GAAG,KAAK,CAAC,MAAM,CAAC;CAQ7D"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Construct } from "constructs";
|
|
2
|
+
import { StringParameter } from "aws-cdk-lib/aws-ssm";
|
|
3
|
+
import { Vpc } from "aws-cdk-lib/aws-ec2";
|
|
4
|
+
import ixDeployConfig from "../deployConfig.js";
|
|
5
|
+
export class IxVpcDetails extends Construct {
|
|
6
|
+
vpc;
|
|
7
|
+
constructor(scope, id) {
|
|
8
|
+
super(scope, id);
|
|
9
|
+
this.vpc = this.getVpc(scope, id);
|
|
10
|
+
}
|
|
11
|
+
getVpc(scope, id) {
|
|
12
|
+
const vpcId = StringParameter.valueForStringParameter(scope, "/vpc/id");
|
|
13
|
+
return Vpc.fromVpcAttributes(this, id + "-Vpc", {
|
|
14
|
+
vpcId,
|
|
15
|
+
availabilityZones: [
|
|
16
|
+
"ap-southeast-2a",
|
|
17
|
+
"ap-southeast-2b",
|
|
18
|
+
"ap-southeast-2c",
|
|
19
|
+
],
|
|
20
|
+
isolatedSubnetIds: IxVpcDetails.getVpcSubnetIds(scope),
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
static getVpcSubnetIds(scope) {
|
|
24
|
+
return [1, 2, 3].map((subnetNum) => StringParameter.valueForStringParameter(scope, `/vpc/subnet/private-${ixDeployConfig.workloadGroup}/${subnetNum}/id`));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ICertificate } from "aws-cdk-lib/aws-certificatemanager";
|
|
2
|
+
import { Construct } from "constructs";
|
|
3
|
+
/**
|
|
4
|
+
* Properties to configure an HTTPS Redirect
|
|
5
|
+
*/
|
|
6
|
+
export interface WebsiteRedirectProps {
|
|
7
|
+
/**
|
|
8
|
+
* The redirect target fully qualified domain name (FQDN). An alias record
|
|
9
|
+
* will be created that points to your CloudFront distribution. Root domain
|
|
10
|
+
* or sub-domain can be supplied.
|
|
11
|
+
*/
|
|
12
|
+
readonly targetDomain: string;
|
|
13
|
+
/**
|
|
14
|
+
* The domain names that will redirect to `targetDomain`
|
|
15
|
+
*
|
|
16
|
+
* @default - the domain name of the hosted zone
|
|
17
|
+
*/
|
|
18
|
+
readonly recordNames: string[];
|
|
19
|
+
/**
|
|
20
|
+
* The AWS Certificate Manager (ACM) certificate that will be associated with
|
|
21
|
+
* the CloudFront distribution that will be created. If provided, the certificate must be
|
|
22
|
+
* stored in us-east-1 (N. Virginia)
|
|
23
|
+
*
|
|
24
|
+
* @default - A new certificate is created in us-east-1 (N. Virginia)
|
|
25
|
+
*/
|
|
26
|
+
readonly certificate?: ICertificate;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Allows creating a domainA -> domainB redirect using CloudFront and S3.
|
|
30
|
+
* You can specify multiple domains to be redirected.
|
|
31
|
+
*/
|
|
32
|
+
export declare class IxWebsiteRedirect extends Construct {
|
|
33
|
+
constructor(scope: Construct, id: string, props: WebsiteRedirectProps);
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=IxWebsiteRedirect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IxWebsiteRedirect.d.ts","sourceRoot":"","sources":["../../src/cdk-constructs/IxWebsiteRedirect.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAelE,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAKvC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B;;;;OAIG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;IAE/B;;;;;;OAMG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,YAAY,CAAC;CACrC;AAED;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,SAAS;gBAClC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB;CA0EtE"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Based off https://github.com/sst/v2/blob/37578037ff80638e2f0eaf0dc59a83dae52e4e45/packages/sst/src/constructs/cdk/website-redirect.ts
|
|
2
|
+
// Not quite sure why an s3 bucket is used for generating the redirect rather than a cloudfront edge lambda,
|
|
3
|
+
// maybe it's cheaper? In any case it's what SST uses and those devs have put a lot more thought into
|
|
4
|
+
// this that we have so I'm going to trust them on this one.
|
|
5
|
+
import { CloudFrontWebDistribution, OriginProtocolPolicy, PriceClass, ViewerCertificate, ViewerProtocolPolicy, } from "aws-cdk-lib/aws-cloudfront";
|
|
6
|
+
import { CloudFrontTarget } from "aws-cdk-lib/aws-route53-targets";
|
|
7
|
+
import { BlockPublicAccess, Bucket, RedirectProtocol, } from "aws-cdk-lib/aws-s3";
|
|
8
|
+
import { ArnFormat, RemovalPolicy, Stack, Token } from "aws-cdk-lib/core";
|
|
9
|
+
import { Construct } from "constructs";
|
|
10
|
+
import { convertToBase62Hash } from "../lib/utils/hash.js";
|
|
11
|
+
import { IxDnsRecord } from "./IxDnsRecord.js";
|
|
12
|
+
import { IxCertificate } from "./IxCertificate.js";
|
|
13
|
+
/**
|
|
14
|
+
* Allows creating a domainA -> domainB redirect using CloudFront and S3.
|
|
15
|
+
* You can specify multiple domains to be redirected.
|
|
16
|
+
*/
|
|
17
|
+
export class IxWebsiteRedirect extends Construct {
|
|
18
|
+
constructor(scope, id, props) {
|
|
19
|
+
super(scope, id);
|
|
20
|
+
const domainNames = props.recordNames;
|
|
21
|
+
let redirectCert = props.certificate;
|
|
22
|
+
if (!redirectCert) {
|
|
23
|
+
const newCert = new IxCertificate(scope, id + "-IxRedirectCertificate", {
|
|
24
|
+
domainName: domainNames[0],
|
|
25
|
+
subjectAlternativeNames: domainNames.slice(1),
|
|
26
|
+
region: "us-east-1", // CloudFront will only use certificates in us-east-1
|
|
27
|
+
});
|
|
28
|
+
redirectCert = newCert.acmCertificate;
|
|
29
|
+
}
|
|
30
|
+
const certificateRegion = Stack.of(this).splitArn(redirectCert.certificateArn, ArnFormat.SLASH_RESOURCE_NAME).region;
|
|
31
|
+
if (!Token.isUnresolved(certificateRegion) &&
|
|
32
|
+
certificateRegion !== "us-east-1") {
|
|
33
|
+
throw new Error(`The certificate must be in the us-east-1 region and the certificate you provided is in ${certificateRegion}.`);
|
|
34
|
+
}
|
|
35
|
+
const redirectBucket = new Bucket(this, "RedirectBucket", {
|
|
36
|
+
websiteRedirect: {
|
|
37
|
+
hostName: props.targetDomain,
|
|
38
|
+
protocol: RedirectProtocol.HTTPS,
|
|
39
|
+
},
|
|
40
|
+
removalPolicy: RemovalPolicy.DESTROY,
|
|
41
|
+
blockPublicAccess: BlockPublicAccess.BLOCK_ALL,
|
|
42
|
+
});
|
|
43
|
+
const redirectDist = new CloudFrontWebDistribution(this, "RedirectDistribution", {
|
|
44
|
+
defaultRootObject: "",
|
|
45
|
+
originConfigs: [
|
|
46
|
+
{
|
|
47
|
+
behaviors: [{ isDefaultBehavior: true }],
|
|
48
|
+
customOriginSource: {
|
|
49
|
+
domainName: redirectBucket.bucketWebsiteDomainName,
|
|
50
|
+
originProtocolPolicy: OriginProtocolPolicy.HTTP_ONLY,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
viewerCertificate: ViewerCertificate.fromAcmCertificate(redirectCert, {
|
|
55
|
+
aliases: domainNames,
|
|
56
|
+
}),
|
|
57
|
+
comment: `Redirect to ${props.targetDomain} from ${domainNames.join(", ")}`,
|
|
58
|
+
priceClass: PriceClass.PRICE_CLASS_ALL,
|
|
59
|
+
viewerProtocolPolicy: ViewerProtocolPolicy.REDIRECT_TO_HTTPS,
|
|
60
|
+
});
|
|
61
|
+
for (const domainName of domainNames) {
|
|
62
|
+
const domainNameLogicalId = convertToBase62Hash(domainName);
|
|
63
|
+
new IxDnsRecord(scope, `DnsRecord-Redirect-${domainNameLogicalId}`, {
|
|
64
|
+
type: "ALIAS",
|
|
65
|
+
name: domainName,
|
|
66
|
+
value: redirectDist.distributionDomainName,
|
|
67
|
+
aliasZoneId: CloudFrontTarget.getHostedZoneId(scope),
|
|
68
|
+
ttl: 900,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-check-handler-body.d.ts","sourceRoot":"","sources":["../../../src/cdk-constructs/SiteOidcAuth/auth-check-handler-body.ts"],"names":[],"mappings":""}
|