Skip to content

Commit

Permalink
fix: touch all DomainValidationOptions HostedZoneIds for ACM Cert
Browse files Browse the repository at this point in the history
  • Loading branch information
semcc committed Sep 30, 2024
1 parent a0e9077 commit dac26ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mappings/services/certificate-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { deleteUndefinedKeys, registerMappingTyped } from "../utils.js";

export function registerCertificateManagerMappings() {
registerMappingTyped(CfnCertificate, AcmCertificate, {
resource(scope, id, props) {
resource(scope, id, props, proxy) {
const cert = new AcmCertificate(
scope,
id,
Expand All @@ -29,6 +29,7 @@ export function registerCertificateManagerMappings() {
);

if (props.ValidationMethod === "DNS") {
proxy.touchPath("DomainValidationOptions.*.HostedZoneId");
const hostedZoneId = props.DomainValidationOptions?.[0].HostedZoneId
?? new DataAwsRoute53Zone(scope, `${id}-zone-data`, {
name: props.DomainName,
Expand Down

0 comments on commit dac26ca

Please sign in to comment.