diff --git a/package-lock.json b/package-lock.json index d52540595a..546921365b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9498,75 +9498,75 @@ "integrity": "sha512-4zd4txmN7dYEx32kH/K+gecnZhnGDdCrRFK6/n5TGUtqtyjevw0uPul0knJ9PzwDXeNf9MsWzGhjxGeI1M43FA==", "dev": true, "requires": { - "@npmcli/arborist": "*", - "@npmcli/ci-detect": "*", - "@npmcli/config": "*", - "@npmcli/map-workspaces": "*", - "@npmcli/package-json": "*", - "@npmcli/run-script": "*", - "abbrev": "*", - "ansicolors": "*", - "ansistyles": "*", - "archy": "*", - "cacache": "*", - "chalk": "*", - "chownr": "*", - "cli-columns": "*", - "cli-table3": "*", - "columnify": "*", - "fastest-levenshtein": "*", - "glob": "*", - "graceful-fs": "*", - "hosted-git-info": "*", - "ini": "*", - "init-package-json": "*", - "is-cidr": "*", - "json-parse-even-better-errors": "*", - "libnpmaccess": "*", - "libnpmdiff": "*", - "libnpmexec": "*", - "libnpmfund": "*", - "libnpmhook": "*", - "libnpmorg": "*", - "libnpmpack": "*", - "libnpmpublish": "*", - "libnpmsearch": "*", - "libnpmteam": "*", - "libnpmversion": "*", - "make-fetch-happen": "*", - "minipass": "*", - "minipass-pipeline": "*", - "mkdirp": "*", - "mkdirp-infer-owner": "*", - "ms": "*", - "node-gyp": "*", - "nopt": "*", - "npm-audit-report": "*", - "npm-install-checks": "*", - "npm-package-arg": "*", - "npm-pick-manifest": "*", - "npm-profile": "*", - "npm-registry-fetch": "*", - "npm-user-validate": "*", - "npmlog": "*", - "opener": "*", - "pacote": "*", - "parse-conflict-json": "*", - "qrcode-terminal": "*", - "read": "*", - "read-package-json": "*", - "read-package-json-fast": "*", - "readdir-scoped-modules": "*", - "rimraf": "*", - "semver": "*", - "ssri": "*", - "tar": "*", - "text-table": "*", - "tiny-relative-date": "*", - "treeverse": "*", - "validate-npm-package-name": "*", - "which": "*", - "write-file-atomic": "*" + "@npmcli/arborist": "^2.8.3", + "@npmcli/ci-detect": "^1.2.0", + "@npmcli/config": "^2.3.0", + "@npmcli/map-workspaces": "^1.0.4", + "@npmcli/package-json": "^1.0.1", + "@npmcli/run-script": "^1.8.6", + "abbrev": "~1.1.1", + "ansicolors": "~0.3.2", + "ansistyles": "~0.1.3", + "archy": "~1.0.0", + "cacache": "^15.3.0", + "chalk": "^4.1.2", + "chownr": "^2.0.0", + "cli-columns": "^3.1.2", + "cli-table3": "^0.6.0", + "columnify": "~1.5.4", + "fastest-levenshtein": "^1.0.12", + "glob": "^7.1.7", + "graceful-fs": "^4.2.8", + "hosted-git-info": "^4.0.2", + "ini": "^2.0.0", + "init-package-json": "^2.0.5", + "is-cidr": "^4.0.2", + "json-parse-even-better-errors": "^2.3.1", + "libnpmaccess": "^4.0.2", + "libnpmdiff": "^2.0.4", + "libnpmexec": "^2.0.1", + "libnpmfund": "^1.1.0", + "libnpmhook": "^6.0.2", + "libnpmorg": "^2.0.2", + "libnpmpack": "^2.0.1", + "libnpmpublish": "^4.0.1", + "libnpmsearch": "^3.1.1", + "libnpmteam": "^2.0.3", + "libnpmversion": "^1.2.1", + "make-fetch-happen": "^9.1.0", + "minipass": "^3.1.3", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "mkdirp-infer-owner": "^2.0.0", + "ms": "^2.1.2", + "node-gyp": "^7.1.2", + "nopt": "^5.0.0", + "npm-audit-report": "^2.1.5", + "npm-install-checks": "^4.0.0", + "npm-package-arg": "^8.1.5", + "npm-pick-manifest": "^6.1.1", + "npm-profile": "^5.0.3", + "npm-registry-fetch": "^11.0.0", + "npm-user-validate": "^1.0.1", + "npmlog": "^5.0.1", + "opener": "^1.5.2", + "pacote": "^11.3.5", + "parse-conflict-json": "^1.1.1", + "qrcode-terminal": "^0.12.0", + "read": "~1.0.7", + "read-package-json": "^4.1.1", + "read-package-json-fast": "^2.0.3", + "readdir-scoped-modules": "^1.1.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "ssri": "^8.0.1", + "tar": "^6.1.11", + "text-table": "~0.2.0", + "tiny-relative-date": "^1.3.0", + "treeverse": "^1.0.4", + "validate-npm-package-name": "~3.0.0", + "which": "^2.0.2", + "write-file-atomic": "^3.0.3" }, "dependencies": { "@gar/promisify": { diff --git a/src/constructs/acm/certificate.ts b/src/constructs/acm/certificate.ts index 78ee5eac83..25f58183be 100644 --- a/src/constructs/acm/certificate.ts +++ b/src/constructs/acm/certificate.ts @@ -3,18 +3,13 @@ import type { CertificateProps } from "@aws-cdk/aws-certificatemanager/lib/certi import { HostedZone } from "@aws-cdk/aws-route53"; import { RemovalPolicy } from "@aws-cdk/core"; import { Stage } from "../../constants"; +import type { GuDomainNameProps } from "../../types/domain-names"; import { GuStatefulMigratableConstruct } from "../../utils/mixin"; import type { GuStack } from "../core"; import { AppIdentity } from "../core/identity"; import type { GuMigratingResource } from "../core/migrating"; -export type GuCertificateProps = Record & GuMigratingResource; -export type GuCertificatePropsWithApp = GuCertificateProps & AppIdentity; - -export interface GuDnsValidatedCertificateProps { - domainName: string; - hostedZoneId?: string; -} +export type GuCertificatePropsWithApp = GuDomainNameProps & AppIdentity; /** * Construct which creates a DNS-validated ACM Certificate. diff --git a/src/patterns/__snapshots__/ec2-app.test.ts.snap b/src/patterns/__snapshots__/ec2-app.test.ts.snap index 8a76618e08..8316c2437e 100644 --- a/src/patterns/__snapshots__/ec2-app.test.ts.snap +++ b/src/patterns/__snapshots__/ec2-app.test.ts.snap @@ -515,6 +515,33 @@ Object { }, "Type": "AWS::ElasticLoadBalancingV2::Listener", }, + "LoadBalancerCNameTestguec2app": Object { + "Properties": Object { + "Name": Object { + "Fn::FindInMap": Array [ + "stagemapping", + Object { + "Ref": "Stage", + }, + "domainName", + ], + }, + "RecordType": "CNAME", + "ResourceRecords": Array [ + Object { + "Fn::GetAtt": Array [ + "LoadBalancerTestguec2appC77A055C", + "DNSName", + ], + }, + ], + "Stage": Object { + "Ref": "Stage", + }, + "TTL": 3600, + }, + "Type": "Guardian::DNS::RecordSet", + }, "LoadBalancerTestguec2appC77A055C": Object { "Properties": Object { "LoadBalancerAttributes": Array [ @@ -1352,6 +1379,33 @@ Object { }, "Type": "AWS::ElasticLoadBalancingV2::Listener", }, + "LoadBalancerCNameTestguec2app": Object { + "Properties": Object { + "Name": Object { + "Fn::FindInMap": Array [ + "stagemapping", + Object { + "Ref": "Stage", + }, + "domainName", + ], + }, + "RecordType": "CNAME", + "ResourceRecords": Array [ + Object { + "Fn::GetAtt": Array [ + "LoadBalancerTestguec2appC77A055C", + "DNSName", + ], + }, + ], + "Stage": Object { + "Ref": "Stage", + }, + "TTL": 3600, + }, + "Type": "Guardian::DNS::RecordSet", + }, "LoadBalancerTestguec2appC77A055C": Object { "Properties": Object { "LoadBalancerAttributes": Array [ diff --git a/src/patterns/ec2-app.test.ts b/src/patterns/ec2-app.test.ts index 039e2fb6cf..b6b6df3cb9 100644 --- a/src/patterns/ec2-app.test.ts +++ b/src/patterns/ec2-app.test.ts @@ -32,7 +32,7 @@ function simpleEc2AppForTesting(stack: GuStack, app: string, props: Partial & GuMigratingResource; + +export interface GuDomainName { + domainName: string; + hostedZoneId?: string; +}