"Unbelievalbe" - Anonymous
You heard it here first folks. DNS management in AWS just got even eaiser.
I know. Hard to believe. But…It’s true.
With the release of v0.0.9 of AWS CDK Split Horizon DNS you can manage all of your DNS configurations with a few lines of code.
const existingZone = new route53.PrivateHostedZone(
stack,
'ExistingPrivateZone',
{
zoneName: 'example.com',
vpc,
}
);
const firstTarget: AliasTarget = {
target: ['8.8.8.8'],
private: true,
};
new SplitHorizonDns(stack, 'MostBasicTestConstruct', {
zoneName: 'example.com',
existingPrivateZone: existingZone,
targets: [firstTarget],
});
Now you can import your existing hosted zones into the SplitHorizonDns construct! No more stepping on the toes of existing zones. Gone are the days of having to recreate records. Simply point the construct the way and watch the magic happen.
We’ve (and when I say “we” I really mean “I”. But you could change that!) also added a new safeguard: disallowPrivateZone. Which entirely disables private hosted zone management within the construct. This way you can isolate your private zone resources if you so desire.
Check it all out now by running
npm i aws-cdk-split-horizon-dns@latest
in your CDK project!
Best of luck and hope this helps!