Turbot DNS Automation

Overview

Turbot DNS automation allows teams to automatically configure infrastructure level DNS management, including record management for services like EC2, RDS, etc. For each service, a consistent and flexible naming scheme is designed to use IDs, name tags and more to make DNS easy for application teams across the entire organization. Records are automatically created and cleaned up in real-time based on the changes to your infrastructure.

Getting Started

Base Domain Infrastructure Hosted Zone

To get started the base domain infrastructure hosted zone will need to be created first. To create this, the options below need to be set at the cluster level or above:

  • Turbot > DNS > Infrastructure Domain Name Template
    • The cluster information is available for use in the template, e.g., cluster.id, cluster.title.
  • Turbot> DNS > Infrastructure Zone

Account Domain Infrastructure Hosted Zone

Once the base domain infrastructure hosted zone is created, the account level infrastructure hosted zones will need to be created and have delegation configured back to the base domain hosted zone.

Each account level zone can have a different domain name, but all of these zones will use the base domain name set in the previous step. The following options need to be set at the account level or above in order to have Turbot automatically create and configure the account level zones:

  • Turbot > DNS > Account Infrastructure Domain Name Template
    • The base domain name is automatically appended at the end, including the preceding ‘.’, so you should NOT add that in this template.
    • The account information is available for use in the template, e.g., account.id, account.title.
  • Turbot > DNS > Account Infrastructure Zone

Infrastructure DNS Records

After the account level zone is configured, DNS records for various services like EC2, RDS, and Redshift can be created. Records for each of these services will be generated based on their respective Infrastructure DNS Records Template option.

By default, these records are created in the account level zone unless the record name in the template ends with the base infrastructure domain name (either manually specified or with the baseDomain variable).

For each service, two options need to be set to enable record creation and clean up. For instance, the two options for EC2 instances are:

  • AWS > EC2 > Instance Infrastructure DNS Records Template
  • AWS > EC2 > Instance Infrastructure DNS Records

Depending on the service, different values will be used in the record values, such as IP address. For example, for EC2 instance DNS records, the instance’s private IP address will be used as the value in each record. More information for each service can be found below:

  • EC2 Instance: Private IP Address

Customizing DNS Records Templates

It is recommended to wrap all record names in the template in double quotation marks to ensure they can render successfully.

The templates are in Nunjucks / Jinja2 format with these variables:

  • account
    • id
    • clusterId
    • title
  • region
  • infrastructureDomainName

and these filters:

  • built-in filters
  • alphanum
  • awsAccountIdString
  • dnsSafeName - Convert to lowercase and remove all characters except alphanumerics, periods, and hyphens.
  • hex
  • ipOctet
  • ipOctetBase36Dec
  • isString
  • json
  • padLeft
  • region3
  • region5

In addition to the variables listed above, each service also has additional data types available depending on the service. More information for each service can be found below:

Additional Notes

  • CMDB MUST be enabled for the account in order for record clean up, i.e., deleting records for a terminated instance, to work.
  • If two or more records have the same name, a single record will be created with all of the record values.
Was this article helpful?
0 out of 0 found this helpful