Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/deployments/cdk/src/apps/phase-1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ export async function deploy({ acceleratorConfig, accountStacks, accounts, conte
acceleratorPrefix: context.acceleratorPrefix,
domain: phz,
});
return new LogGroup(zonesStack, `Route53HostedZoneLogGroup`, {
return new LogGroup(zonesStack, `Route53HostedZoneLogGroup${pascalCase(phz)}`, {
logGroupName,
roleArn: logGroupLambdaRoleOutput.roleArn,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,16 @@ async function onUpdate(event: CloudFormationCustomResourceUpdateEvent) {
};
// authorize association of VPC with Hosted zones when VPC and Hosted Zones are defined in two different accounts
if (vpcAccountId !== hostedZoneAccountId) {
await throttlingBackOff(() => hostedZoneRoute53.createVPCAssociationAuthorization(hostedZoneProps).promise());
try {
await throttlingBackOff(() => hostedZoneRoute53.createVPCAssociationAuthorization(hostedZoneProps).promise());
} catch (e) {
if (e.code === 'NoSuchHostedZone') {
console.info(`No Domain exists with ID "${hostedZoneId}"; ignore this error and continue`);
continue;
} else {
throw new Error(e);
}
}
}

// associate VPC with Hosted zones
Expand Down Expand Up @@ -273,7 +282,13 @@ async function onDelete(event: CloudFormationCustomResourceDeleteEvent) {
};
// authorize association of VPC with Hosted zones when VPC and Hosted Zones are defined in two different accounts
if (vpcAccountId !== hostedZoneAccountId) {
await throttlingBackOff(() => hostedZoneRoute53.createVPCAssociationAuthorization(hostedZoneProps).promise());
try {
await throttlingBackOff(() => hostedZoneRoute53.createVPCAssociationAuthorization(hostedZoneProps).promise());
} catch (e) {
console.error(`Ignoring error while deleting Association and stack ${hostedZoneId} to VPC "${vpcName}"`);
console.error(e);
continue;
}
}

// associate VPC with Hosted zones
Expand Down