1 | ;
|
2 | var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
3 | Object.defineProperty(exports, "__esModule", { value: true });
|
4 | exports.CrossAccountZoneDelegationRecord = exports.ZoneDelegationRecord = exports.DsRecord = exports.NsRecord = exports.MxRecord = exports.CaaAmazonRecord = exports.CaaRecord = exports.CaaTag = exports.SrvRecord = exports.TxtRecord = exports.CnameRecord = exports.AaaaRecord = exports.ARecord = exports.AddressRecordTarget = exports.RecordSet = exports.RecordTarget = exports.RecordType = void 0;
|
5 | const jsiiDeprecationWarnings = require("../.warnings.jsii.js");
|
6 | const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
|
7 | const path = require("path");
|
8 | const iam = require("@aws-cdk/aws-iam");
|
9 | const core_1 = require("@aws-cdk/core");
|
10 | const route53_generated_1 = require("./route53.generated");
|
11 | const util_1 = require("./util");
|
12 | const CROSS_ACCOUNT_ZONE_DELEGATION_RESOURCE_TYPE = 'Custom::CrossAccountZoneDelegation';
|
13 | // v2 - keep this import as a separate section to reduce merge conflict when forward merging with the v2 branch.
|
14 | // eslint-disable-next-line
|
15 | const core_2 = require("@aws-cdk/core");
|
16 | /**
|
17 | * The record type.
|
18 | */
|
19 | var RecordType;
|
20 | (function (RecordType) {
|
21 | /**
|
22 | * route traffic to a resource, such as a web server, using an IPv4 address in dotted decimal
|
23 | * notation
|
24 | *
|
25 | * @see https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html#AFormat
|
26 | */
|
27 | RecordType["A"] = "A";
|
28 | /**
|
29 | * route traffic to a resource, such as a web server, using an IPv6 address in colon-separated
|
30 | * hexadecimal format
|
31 | *
|
32 | * @see https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html#AAAAFormat
|
33 | */
|
34 | RecordType["AAAA"] = "AAAA";
|
35 | /**
|
36 | * A CAA record specifies which certificate authorities (CAs) are allowed to issue certificates
|
37 | * for a domain or subdomain
|
38 | *
|
39 | * @see https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html#CAAFormat
|
40 | */
|
41 | RecordType["CAA"] = "CAA";
|
42 | /**
|
43 | * A CNAME record maps DNS queries for the name of the current record, such as acme.example.com,
|
44 | * to another domain (example.com or example.net) or subdomain (acme.example.com or zenith.example.org).
|
45 | *
|
46 | * @see https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html#CNAMEFormat
|
47 | */
|
48 | RecordType["CNAME"] = "CNAME";
|
49 | /**
|
50 | * A delegation signer (DS) record refers a zone key for a delegated subdomain zone.
|
51 | *
|
52 | * @see https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html#DSFormat
|
53 | */
|
54 | RecordType["DS"] = "DS";
|
55 | /**
|
56 | * An MX record specifies the names of your mail servers and, if you have two or more mail servers,
|
57 | * the priority order.
|
58 | *
|
59 | * @see https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html#MXFormat
|
60 | */
|
61 | RecordType["MX"] = "MX";
|
62 | /**
|
63 | * A Name Authority Pointer (NAPTR) is a type of record that is used by Dynamic Delegation Discovery
|
64 | * System (DDDS) applications to convert one value to another or to replace one value with another.
|
65 | * For example, one common use is to convert phone numbers into SIP URIs.
|
66 | *
|
67 | * @see https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html#NAPTRFormat
|
68 | */
|
69 | RecordType["NAPTR"] = "NAPTR";
|
70 | /**
|
71 | * An NS record identifies the name servers for the hosted zone
|
72 | *
|
73 | * @see https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html#NSFormat
|
74 | */
|
75 | RecordType["NS"] = "NS";
|
76 | /**
|
77 | * A PTR record maps an IP address to the corresponding domain name.
|
78 | *
|
79 | * @see https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html#PTRFormat
|
80 | */
|
81 | RecordType["PTR"] = "PTR";
|
82 | /**
|
83 | * A start of authority (SOA) record provides information about a domain and the corresponding Amazon
|
84 | * Route 53 hosted zone
|
85 | *
|
86 | * @see https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html#SOAFormat
|
87 | */
|
88 | RecordType["SOA"] = "SOA";
|
89 | /**
|
90 | * SPF records were formerly used to verify the identity of the sender of email messages.
|
91 | * Instead of an SPF record, we recommend that you create a TXT record that contains the applicable value.
|
92 | *
|
93 | * @see https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html#SPFFormat
|
94 | */
|
95 | RecordType["SPF"] = "SPF";
|
96 | /**
|
97 | * An SRV record Value element consists of four space-separated values. The first three values are
|
98 | * decimal numbers representing priority, weight, and port. The fourth value is a domain name.
|
99 | *
|
100 | * @see https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html#SRVFormat
|
101 | */
|
102 | RecordType["SRV"] = "SRV";
|
103 | /**
|
104 | * A TXT record contains one or more strings that are enclosed in double quotation marks (").
|
105 | *
|
106 | * @see https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html#TXTFormat
|
107 | */
|
108 | RecordType["TXT"] = "TXT";
|
109 | })(RecordType = exports.RecordType || (exports.RecordType = {}));
|
110 | /**
|
111 | * Type union for a record that accepts multiple types of target.
|
112 | */
|
113 | class RecordTarget {
|
114 | /**
|
115 | *
|
116 | * @param values correspond with the chosen record type (e.g. for 'A' Type, specify one or more IP addresses)
|
117 | * @param aliasTarget alias for targets such as CloudFront distribution to route traffic to
|
118 | */
|
119 | constructor(values, aliasTarget) {
|
120 | this.values = values;
|
121 | this.aliasTarget = aliasTarget;
|
122 | try {
|
123 | jsiiDeprecationWarnings._aws_cdk_aws_route53_IAliasRecordTarget(aliasTarget);
|
124 | }
|
125 | catch (error) {
|
126 | if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
127 | Error.captureStackTrace(error, RecordTarget);
|
128 | }
|
129 | throw error;
|
130 | }
|
131 | }
|
132 | /**
|
133 | * Use string values as target.
|
134 | */
|
135 | static fromValues(...values) {
|
136 | return new RecordTarget(values);
|
137 | }
|
138 | /**
|
139 | * Use an alias as target.
|
140 | */
|
141 | static fromAlias(aliasTarget) {
|
142 | try {
|
143 | jsiiDeprecationWarnings._aws_cdk_aws_route53_IAliasRecordTarget(aliasTarget);
|
144 | }
|
145 | catch (error) {
|
146 | if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
147 | Error.captureStackTrace(error, this.fromAlias);
|
148 | }
|
149 | throw error;
|
150 | }
|
151 | return new RecordTarget(undefined, aliasTarget);
|
152 | }
|
153 | /**
|
154 | * Use ip addresses as target.
|
155 | */
|
156 | static fromIpAddresses(...ipAddresses) {
|
157 | return RecordTarget.fromValues(...ipAddresses);
|
158 | }
|
159 | }
|
160 | exports.RecordTarget = RecordTarget;
|
161 | _a = JSII_RTTI_SYMBOL_1;
|
162 | RecordTarget[_a] = { fqn: "@aws-cdk/aws-route53.RecordTarget", version: "1.204.0" };
|
163 | /**
|
164 | * A record set.
|
165 | */
|
166 | class RecordSet extends core_1.Resource {
|
167 | constructor(scope, id, props) {
|
168 | super(scope, id);
|
169 | try {
|
170 | jsiiDeprecationWarnings._aws_cdk_aws_route53_RecordSetProps(props);
|
171 | }
|
172 | catch (error) {
|
173 | if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
174 | Error.captureStackTrace(error, RecordSet);
|
175 | }
|
176 | throw error;
|
177 | }
|
178 | const ttl = props.target.aliasTarget ? undefined : ((props.ttl && props.ttl.toSeconds()) ?? 1800).toString();
|
179 | const recordSet = new route53_generated_1.CfnRecordSet(this, 'Resource', {
|
180 | hostedZoneId: props.zone.hostedZoneId,
|
181 | name: util_1.determineFullyQualifiedDomainName(props.recordName || props.zone.zoneName, props.zone),
|
182 | type: props.recordType,
|
183 | resourceRecords: props.target.values,
|
184 | aliasTarget: props.target.aliasTarget && props.target.aliasTarget.bind(this, props.zone),
|
185 | ttl,
|
186 | comment: props.comment,
|
187 | });
|
188 | this.domainName = recordSet.ref;
|
189 | }
|
190 | }
|
191 | exports.RecordSet = RecordSet;
|
192 | _b = JSII_RTTI_SYMBOL_1;
|
193 | RecordSet[_b] = { fqn: "@aws-cdk/aws-route53.RecordSet", version: "1.204.0" };
|
194 | /**
|
195 | * Target for a DNS A Record
|
196 | *
|
197 | * @deprecated Use RecordTarget
|
198 | */
|
199 | class AddressRecordTarget extends RecordTarget {
|
200 | }
|
201 | exports.AddressRecordTarget = AddressRecordTarget;
|
202 | _c = JSII_RTTI_SYMBOL_1;
|
203 | AddressRecordTarget[_c] = { fqn: "@aws-cdk/aws-route53.AddressRecordTarget", version: "1.204.0" };
|
204 | /**
|
205 | * A DNS A record
|
206 | *
|
207 | * @resource AWS::Route53::RecordSet
|
208 | */
|
209 | class ARecord extends RecordSet {
|
210 | constructor(scope, id, props) {
|
211 | super(scope, id, {
|
212 | ...props,
|
213 | recordType: RecordType.A,
|
214 | target: props.target,
|
215 | });
|
216 | try {
|
217 | jsiiDeprecationWarnings._aws_cdk_aws_route53_ARecordProps(props);
|
218 | }
|
219 | catch (error) {
|
220 | if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
221 | Error.captureStackTrace(error, ARecord);
|
222 | }
|
223 | throw error;
|
224 | }
|
225 | }
|
226 | }
|
227 | exports.ARecord = ARecord;
|
228 | _d = JSII_RTTI_SYMBOL_1;
|
229 | ARecord[_d] = { fqn: "@aws-cdk/aws-route53.ARecord", version: "1.204.0" };
|
230 | /**
|
231 | * A DNS AAAA record
|
232 | *
|
233 | * @resource AWS::Route53::RecordSet
|
234 | */
|
235 | class AaaaRecord extends RecordSet {
|
236 | constructor(scope, id, props) {
|
237 | super(scope, id, {
|
238 | ...props,
|
239 | recordType: RecordType.AAAA,
|
240 | target: props.target,
|
241 | });
|
242 | try {
|
243 | jsiiDeprecationWarnings._aws_cdk_aws_route53_AaaaRecordProps(props);
|
244 | }
|
245 | catch (error) {
|
246 | if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
247 | Error.captureStackTrace(error, AaaaRecord);
|
248 | }
|
249 | throw error;
|
250 | }
|
251 | }
|
252 | }
|
253 | exports.AaaaRecord = AaaaRecord;
|
254 | _e = JSII_RTTI_SYMBOL_1;
|
255 | AaaaRecord[_e] = { fqn: "@aws-cdk/aws-route53.AaaaRecord", version: "1.204.0" };
|
256 | /**
|
257 | * A DNS CNAME record
|
258 | *
|
259 | * @resource AWS::Route53::RecordSet
|
260 | */
|
261 | class CnameRecord extends RecordSet {
|
262 | constructor(scope, id, props) {
|
263 | super(scope, id, {
|
264 | ...props,
|
265 | recordType: RecordType.CNAME,
|
266 | target: RecordTarget.fromValues(props.domainName),
|
267 | });
|
268 | try {
|
269 | jsiiDeprecationWarnings._aws_cdk_aws_route53_CnameRecordProps(props);
|
270 | }
|
271 | catch (error) {
|
272 | if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
273 | Error.captureStackTrace(error, CnameRecord);
|
274 | }
|
275 | throw error;
|
276 | }
|
277 | }
|
278 | }
|
279 | exports.CnameRecord = CnameRecord;
|
280 | _f = JSII_RTTI_SYMBOL_1;
|
281 | CnameRecord[_f] = { fqn: "@aws-cdk/aws-route53.CnameRecord", version: "1.204.0" };
|
282 | /**
|
283 | * A DNS TXT record
|
284 | *
|
285 | * @resource AWS::Route53::RecordSet
|
286 | */
|
287 | class TxtRecord extends RecordSet {
|
288 | constructor(scope, id, props) {
|
289 | super(scope, id, {
|
290 | ...props,
|
291 | recordType: RecordType.TXT,
|
292 | target: RecordTarget.fromValues(...props.values.map(v => formatTxt(v))),
|
293 | });
|
294 | try {
|
295 | jsiiDeprecationWarnings._aws_cdk_aws_route53_TxtRecordProps(props);
|
296 | }
|
297 | catch (error) {
|
298 | if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
299 | Error.captureStackTrace(error, TxtRecord);
|
300 | }
|
301 | throw error;
|
302 | }
|
303 | }
|
304 | }
|
305 | exports.TxtRecord = TxtRecord;
|
306 | _g = JSII_RTTI_SYMBOL_1;
|
307 | TxtRecord[_g] = { fqn: "@aws-cdk/aws-route53.TxtRecord", version: "1.204.0" };
|
308 | /**
|
309 | * Formats a text value for use in a TXT record
|
310 | *
|
311 | * Use `JSON.stringify` to correctly escape and enclose in double quotes ("").
|
312 | *
|
313 | * DNS TXT records can contain up to 255 characters in a single string. TXT
|
314 | * record strings over 255 characters must be split into multiple text strings
|
315 | * within the same record.
|
316 | *
|
317 | * @see https://aws.amazon.com/premiumsupport/knowledge-center/route53-resolve-dkim-text-record-error/
|
318 | */
|
319 | function formatTxt(string) {
|
320 | const result = [];
|
321 | let idx = 0;
|
322 | while (idx < string.length) {
|
323 | result.push(string.slice(idx, idx += 255)); // chunks of 255 characters long
|
324 | }
|
325 | return result.map(r => JSON.stringify(r)).join('');
|
326 | }
|
327 | /**
|
328 | * A DNS SRV record
|
329 | *
|
330 | * @resource AWS::Route53::RecordSet
|
331 | */
|
332 | class SrvRecord extends RecordSet {
|
333 | constructor(scope, id, props) {
|
334 | super(scope, id, {
|
335 | ...props,
|
336 | recordType: RecordType.SRV,
|
337 | target: RecordTarget.fromValues(...props.values.map(v => `${v.priority} ${v.weight} ${v.port} ${v.hostName}`)),
|
338 | });
|
339 | try {
|
340 | jsiiDeprecationWarnings._aws_cdk_aws_route53_SrvRecordProps(props);
|
341 | }
|
342 | catch (error) {
|
343 | if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
344 | Error.captureStackTrace(error, SrvRecord);
|
345 | }
|
346 | throw error;
|
347 | }
|
348 | }
|
349 | }
|
350 | exports.SrvRecord = SrvRecord;
|
351 | _h = JSII_RTTI_SYMBOL_1;
|
352 | SrvRecord[_h] = { fqn: "@aws-cdk/aws-route53.SrvRecord", version: "1.204.0" };
|
353 | /**
|
354 | * The CAA tag.
|
355 | */
|
356 | var CaaTag;
|
357 | (function (CaaTag) {
|
358 | /**
|
359 | * Explicity authorizes a single certificate authority to issue a
|
360 | * certificate (any type) for the hostname.
|
361 | */
|
362 | CaaTag["ISSUE"] = "issue";
|
363 | /**
|
364 | * Explicity authorizes a single certificate authority to issue a
|
365 | * wildcard certificate (and only wildcard) for the hostname.
|
366 | */
|
367 | CaaTag["ISSUEWILD"] = "issuewild";
|
368 | /**
|
369 | * Specifies a URL to which a certificate authority may report policy
|
370 | * violations.
|
371 | */
|
372 | CaaTag["IODEF"] = "iodef";
|
373 | })(CaaTag = exports.CaaTag || (exports.CaaTag = {}));
|
374 | /**
|
375 | * A DNS CAA record
|
376 | *
|
377 | * @resource AWS::Route53::RecordSet
|
378 | */
|
379 | class CaaRecord extends RecordSet {
|
380 | constructor(scope, id, props) {
|
381 | super(scope, id, {
|
382 | ...props,
|
383 | recordType: RecordType.CAA,
|
384 | target: RecordTarget.fromValues(...props.values.map(v => `${v.flag} ${v.tag} "${v.value}"`)),
|
385 | });
|
386 | try {
|
387 | jsiiDeprecationWarnings._aws_cdk_aws_route53_CaaRecordProps(props);
|
388 | }
|
389 | catch (error) {
|
390 | if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
391 | Error.captureStackTrace(error, CaaRecord);
|
392 | }
|
393 | throw error;
|
394 | }
|
395 | }
|
396 | }
|
397 | exports.CaaRecord = CaaRecord;
|
398 | _j = JSII_RTTI_SYMBOL_1;
|
399 | CaaRecord[_j] = { fqn: "@aws-cdk/aws-route53.CaaRecord", version: "1.204.0" };
|
400 | /**
|
401 | * A DNS Amazon CAA record.
|
402 | *
|
403 | * A CAA record to restrict certificate authorities allowed
|
404 | * to issue certificates for a domain to Amazon only.
|
405 | *
|
406 | * @resource AWS::Route53::RecordSet
|
407 | */
|
408 | class CaaAmazonRecord extends CaaRecord {
|
409 | constructor(scope, id, props) {
|
410 | super(scope, id, {
|
411 | ...props,
|
412 | values: [
|
413 | {
|
414 | flag: 0,
|
415 | tag: CaaTag.ISSUE,
|
416 | value: 'amazon.com',
|
417 | },
|
418 | ],
|
419 | });
|
420 | try {
|
421 | jsiiDeprecationWarnings._aws_cdk_aws_route53_CaaAmazonRecordProps(props);
|
422 | }
|
423 | catch (error) {
|
424 | if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
425 | Error.captureStackTrace(error, CaaAmazonRecord);
|
426 | }
|
427 | throw error;
|
428 | }
|
429 | }
|
430 | }
|
431 | exports.CaaAmazonRecord = CaaAmazonRecord;
|
432 | _k = JSII_RTTI_SYMBOL_1;
|
433 | CaaAmazonRecord[_k] = { fqn: "@aws-cdk/aws-route53.CaaAmazonRecord", version: "1.204.0" };
|
434 | /**
|
435 | * A DNS MX record
|
436 | *
|
437 | * @resource AWS::Route53::RecordSet
|
438 | */
|
439 | class MxRecord extends RecordSet {
|
440 | constructor(scope, id, props) {
|
441 | super(scope, id, {
|
442 | ...props,
|
443 | recordType: RecordType.MX,
|
444 | target: RecordTarget.fromValues(...props.values.map(v => `${v.priority} ${v.hostName}`)),
|
445 | });
|
446 | try {
|
447 | jsiiDeprecationWarnings._aws_cdk_aws_route53_MxRecordProps(props);
|
448 | }
|
449 | catch (error) {
|
450 | if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
451 | Error.captureStackTrace(error, MxRecord);
|
452 | }
|
453 | throw error;
|
454 | }
|
455 | }
|
456 | }
|
457 | exports.MxRecord = MxRecord;
|
458 | _l = JSII_RTTI_SYMBOL_1;
|
459 | MxRecord[_l] = { fqn: "@aws-cdk/aws-route53.MxRecord", version: "1.204.0" };
|
460 | /**
|
461 | * A DNS NS record
|
462 | *
|
463 | * @resource AWS::Route53::RecordSet
|
464 | */
|
465 | class NsRecord extends RecordSet {
|
466 | constructor(scope, id, props) {
|
467 | super(scope, id, {
|
468 | ...props,
|
469 | recordType: RecordType.NS,
|
470 | target: RecordTarget.fromValues(...props.values),
|
471 | });
|
472 | try {
|
473 | jsiiDeprecationWarnings._aws_cdk_aws_route53_NsRecordProps(props);
|
474 | }
|
475 | catch (error) {
|
476 | if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
477 | Error.captureStackTrace(error, NsRecord);
|
478 | }
|
479 | throw error;
|
480 | }
|
481 | }
|
482 | }
|
483 | exports.NsRecord = NsRecord;
|
484 | _m = JSII_RTTI_SYMBOL_1;
|
485 | NsRecord[_m] = { fqn: "@aws-cdk/aws-route53.NsRecord", version: "1.204.0" };
|
486 | /**
|
487 | * A DNS DS record
|
488 | *
|
489 | * @resource AWS::Route53::RecordSet
|
490 | */
|
491 | class DsRecord extends RecordSet {
|
492 | constructor(scope, id, props) {
|
493 | super(scope, id, {
|
494 | ...props,
|
495 | recordType: RecordType.DS,
|
496 | target: RecordTarget.fromValues(...props.values),
|
497 | });
|
498 | try {
|
499 | jsiiDeprecationWarnings._aws_cdk_aws_route53_DsRecordProps(props);
|
500 | }
|
501 | catch (error) {
|
502 | if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
503 | Error.captureStackTrace(error, DsRecord);
|
504 | }
|
505 | throw error;
|
506 | }
|
507 | }
|
508 | }
|
509 | exports.DsRecord = DsRecord;
|
510 | _o = JSII_RTTI_SYMBOL_1;
|
511 | DsRecord[_o] = { fqn: "@aws-cdk/aws-route53.DsRecord", version: "1.204.0" };
|
512 | /**
|
513 | * A record to delegate further lookups to a different set of name servers.
|
514 | */
|
515 | class ZoneDelegationRecord extends RecordSet {
|
516 | constructor(scope, id, props) {
|
517 | super(scope, id, {
|
518 | ...props,
|
519 | recordType: RecordType.NS,
|
520 | target: RecordTarget.fromValues(...core_1.Token.isUnresolved(props.nameServers)
|
521 | ? props.nameServers // Can't map a string-array token!
|
522 | : props.nameServers.map(ns => (core_1.Token.isUnresolved(ns) || ns.endsWith('.')) ? ns : `${ns}.`)),
|
523 | ttl: props.ttl || core_1.Duration.days(2),
|
524 | });
|
525 | try {
|
526 | jsiiDeprecationWarnings._aws_cdk_aws_route53_ZoneDelegationRecordProps(props);
|
527 | }
|
528 | catch (error) {
|
529 | if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
530 | Error.captureStackTrace(error, ZoneDelegationRecord);
|
531 | }
|
532 | throw error;
|
533 | }
|
534 | }
|
535 | }
|
536 | exports.ZoneDelegationRecord = ZoneDelegationRecord;
|
537 | _p = JSII_RTTI_SYMBOL_1;
|
538 | ZoneDelegationRecord[_p] = { fqn: "@aws-cdk/aws-route53.ZoneDelegationRecord", version: "1.204.0" };
|
539 | /**
|
540 | * A Cross Account Zone Delegation record
|
541 | */
|
542 | class CrossAccountZoneDelegationRecord extends core_2.Construct {
|
543 | constructor(scope, id, props) {
|
544 | super(scope, id);
|
545 | try {
|
546 | jsiiDeprecationWarnings._aws_cdk_aws_route53_CrossAccountZoneDelegationRecordProps(props);
|
547 | }
|
548 | catch (error) {
|
549 | if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
550 | Error.captureStackTrace(error, CrossAccountZoneDelegationRecord);
|
551 | }
|
552 | throw error;
|
553 | }
|
554 | if (!props.parentHostedZoneName && !props.parentHostedZoneId) {
|
555 | throw Error('At least one of parentHostedZoneName or parentHostedZoneId is required');
|
556 | }
|
557 | if (props.parentHostedZoneName && props.parentHostedZoneId) {
|
558 | throw Error('Only one of parentHostedZoneName and parentHostedZoneId is supported');
|
559 | }
|
560 | const provider = core_1.CustomResourceProvider.getOrCreateProvider(this, CROSS_ACCOUNT_ZONE_DELEGATION_RESOURCE_TYPE, {
|
561 | codeDirectory: path.join(__dirname, 'cross-account-zone-delegation-handler'),
|
562 | runtime: core_1.CustomResourceProviderRuntime.NODEJS_14_X,
|
563 | });
|
564 | const role = iam.Role.fromRoleArn(this, 'cross-account-zone-delegation-handler-role', provider.roleArn);
|
565 | const addToPrinciplePolicyResult = role.addToPrincipalPolicy(new iam.PolicyStatement({
|
566 | effect: iam.Effect.ALLOW,
|
567 | actions: ['sts:AssumeRole'],
|
568 | resources: [props.delegationRole.roleArn],
|
569 | }));
|
570 | const customResource = new core_1.CustomResource(this, 'CrossAccountZoneDelegationCustomResource', {
|
571 | resourceType: CROSS_ACCOUNT_ZONE_DELEGATION_RESOURCE_TYPE,
|
572 | serviceToken: provider.serviceToken,
|
573 | removalPolicy: props.removalPolicy,
|
574 | properties: {
|
575 | AssumeRoleArn: props.delegationRole.roleArn,
|
576 | ParentZoneName: props.parentHostedZoneName,
|
577 | ParentZoneId: props.parentHostedZoneId,
|
578 | DelegatedZoneName: props.delegatedZone.zoneName,
|
579 | DelegatedZoneNameServers: props.delegatedZone.hostedZoneNameServers,
|
580 | TTL: (props.ttl || core_1.Duration.days(2)).toSeconds(),
|
581 | },
|
582 | });
|
583 | if (addToPrinciplePolicyResult.policyDependable) {
|
584 | customResource.node.addDependency(addToPrinciplePolicyResult.policyDependable);
|
585 | }
|
586 | }
|
587 | }
|
588 | exports.CrossAccountZoneDelegationRecord = CrossAccountZoneDelegationRecord;
|
589 | _q = JSII_RTTI_SYMBOL_1;
|
590 | CrossAccountZoneDelegationRecord[_q] = { fqn: "@aws-cdk/aws-route53.CrossAccountZoneDelegationRecord", version: "1.204.0" };
|
591 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVjb3JkLXNldC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInJlY29yZC1zZXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEsNkJBQTZCO0FBQzdCLHdDQUF3QztBQUN4Qyx3Q0FBMko7QUFJM0osMkRBQW1EO0FBQ25ELGlDQUEyRDtBQUUzRCxNQUFNLDJDQUEyQyxHQUFHLG9DQUFvQyxDQUFDO0FBRXpGLGdIQUFnSDtBQUNoSCwyQkFBMkI7QUFDM0Isd0NBQTJEO0FBWTNEOztHQUVHO0FBQ0gsSUFBWSxVQXFHWDtBQXJHRCxXQUFZLFVBQVU7SUFDcEI7Ozs7O09BS0c7SUFDSCxxQkFBTyxDQUFBO0lBRVA7Ozs7O09BS0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