This repo stores our DNS Domains and records as "infrastructure as code" for our organization. The Github actions allow full "gitops" updates for our DNS infrastructure. All updates are done via PR.
Clone this repo as a starting point for your own organization's DNS-as-Code use.
- Clone this repo. Give it a name appropriate for your organization (
dns-configis suggested). - Update
.github/workflows/pr_preview.ymland.github/workflows/pr_push.ymlto use the credentials based on whether you use Method 1, 2 or 3 (see https://github.com/DNSControl/dnscontrol-action/blob/main/README.md) - Update
dnsconfig.jsto include example.com and one of your domains (start with a non-production domain). - Submit a PR, debug any auth issues.
- Add other domains. See https://docs.dnscontrol.org/getting-started/getting-started for tips.
- Update
README.mdto suit your organization. Delete this section.
To add/change/delete DNS records:
Step 1: Clone this config to your local workstation
gh repo clone DNSControl/dns-config
cd dns-configStep 2: Make the changes you desire
vi dnsconfig.jsStep 3: Create a PR
gh pr create --title "chore(www): What I did" --body ""Step 4: Review and approve.
At this point, the Github Actions will kick in, validating your change and
posting a "diff" as a comment. Seeing the "diff" allows you to verify that the
changes that will happen are as you intended. You can make more changes and git push them just like code.
Use your organization's approval process to review and approve the PR.
Step 5: Merge it!
On merger, a Github Action will run dnscontrol push to make the change.
FILL IN.