Skip to content

More flexible CNAME/IP support for WILDCARD_DNS and EXTRA_HOSTS #20

@EvgeniGordeev

Description

@EvgeniGordeev

Today a CNAME/IP specified for EXTRA_HOSTS/WILDCARD_DNS is assumed to be resolved to a single IP using dig @8.8.8.8 +short "${my_add}" A.

Imagine use cases:

  • A DNS entry pointing to Elastic Load Balancer, e.g. using Route53 A DNS entry with an Alias:
    example.com -> <elb_id>.<aws_region>.elb.amazonaws.com.
$ dig @8.8.8.8 +short example.com A
54.XX.XX.XX
3.XX.XX.XX
  • CNAME DNS entry pointing to Alias A DNS entry in Route53 -
    example1.com -> example.com -> <elb_id>.<aws_region>.elb.amazonaws.com.
$ dig @8.8.8.8 +short example1.com A
 example.com
54.XX.XX.XX
3.XX.XX.XX

The IP set behind load balancer is dynamic and might change a couple times a day thus it doesn't make sense to create a zone with IPs which can become stale at any time.

Suggestion:
For CNAME specified WILDCARD_DNS and EXTRA_HOSTS and resolved not to a single IP create a CNAME zone instead:

$TTL  3600
@      IN SOA  example.com. root.example.com. (
 ...
;
      IN NS     example1.com.
*     IN CNAME  example1.com.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions