Small construct to help manage split-horizon DNS configs in AWS Route53
These instructions will give you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on deploying the project on a live system.
See the API Doc for extended details Also see unit tests for extended usage details.
npm install aws-cdk-split-horizon-dns
Then in your code:
import { SplitHorizonDns, AliasTarget } from 'aws-cdk-split-horizon-dns'
const firstTarget: AliasTarget = {
target: ['8.8.8.8'],
private: true,
};
const bucketWebsite = new s3.Bucket(stack, 'BucketWebsite', {
bucketName: exampleDomain, // www.example.com
publicReadAccess: true,
websiteIndexDocument: 'index.html',
});
const constructTarget: AliasTarget = {
target: new targets.BucketWebsiteTarget(bucketWebsite),
public: true,
};
new SplitHorizonDns(scope, 'MyDNS', {
zoneName: 'example.com',
privateZoneVpcs: [vpc],
targets: [constructTarget, firstTarget],
})
Requirements for the software and other tools to build, test and push
- Contributor Covenant - Used for the Code of Conduct
- Creative Commons - Used to choose the license
- projen
- CDK
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use Semantic Versioning for versioning. For the versions available, see the tags on this repository.
- Billie Thompson - Provided README Template - PurpleBooth
- Dakota Lewallen - Initial development - IamFlowz
See also the list of contributors who participated in this project.
Apache. See LICENSE