@ndlib/ndlib-cdk2 1.0.4 → 1.0.5

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.
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StaticHost = void 0;
4
4
  const aws_cdk_lib_1 = require("aws-cdk-lib");
5
5
  const constructs_1 = require("constructs");
6
+ const crypto_1 = require("crypto");
6
7
  class StaticHost extends constructs_1.Construct {
7
8
  constructor(scope, id, props) {
8
9
  var _a;
@@ -116,11 +117,12 @@ class StaticHost extends constructs_1.Construct {
116
117
  // Create DNS record (conditionally)
117
118
  if (props.createDns && props.hostedZoneIds && props.hostedZoneIds.length > 0) {
118
119
  for (const hostedZoneId of props.hostedZoneIds) {
119
- new aws_cdk_lib_1.aws_route53.CnameRecord(this, `ServiceCNAME${hostedZoneId}`, {
120
+ const id = (0, crypto_1.randomUUID)();
121
+ new aws_cdk_lib_1.aws_route53.CnameRecord(this, `ServiceCNAME${id}`, {
120
122
  recordName: this.hostname,
121
123
  comment: this.hostname,
122
124
  domainName: this.cloudfront.distributionDomainName,
123
- zone: aws_cdk_lib_1.aws_route53.HostedZone.fromHostedZoneAttributes(this, `ImportedHostedZone${hostedZoneId}`, {
125
+ zone: aws_cdk_lib_1.aws_route53.HostedZone.fromHostedZoneAttributes(this, `ImportedHostedZone${id}`, {
124
126
  hostedZoneId: hostedZoneId,
125
127
  zoneName: props.domainName,
126
128
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndlib/ndlib-cdk2",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Reusable CDK2 modules used within Hesburgh Libraries of Notre Dame",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",