x-dns

Allows you to configure the DNS settings for the deployment of your containers.

Syntax

PrivateNamespace (AWS CloudMap)

Private Namespace definition (Uses AWS CloudMap)
PrivateNamespace:
  Name: str # TLD to use for the deployment.
  Lookup: str # Domain name to find in CloudMap
  Use: str # Expects the CloudMap ns- namespace ID

Warning

When creating a new one, this domain will be associated with the VPC Route53 “database”. If another Namespace using the same domain name already is associated with the VPC, this will fail.

Public Zone (Route53)

Public DNS Zone using Route53.
PublicZone:
  Name: str # TLD to use for the deployment.
  Lookup: str # Domain name to find in CloudMap
  Use: str # Expects the CloudMap Z[A-Z0-9]+- Hosted Zone Id

Attention

For ACM DNS Validation and other validations to work, the zone must be able to be resolved otherwise automated validation will not work.

DNS records

This section of x-dns allows you to define DNS Records pointing to resources defined in the compose-x files.

The record properties follow the same properties as AWS Route53 RecordSet

When the target is an ELBv2 it automatically creates an alias record.

Examples

Private definition only
x-dns:
  PrivateNamespace:
    Name: mycluster.lan
Public Zone and private zone
x-dns:
  PrivateNamespace:
    Name: mycluster.lan
    Use: ns-abcd012344
  PublicZone:
    Name: public-domain.net
    Use: Z0123456ABCD
Private and public zone with a DNS record pointing to an ELBv2
x-dns:
  PrivateNamespace:
    Name: dev.internal
    Lookup:
      RoleArn: ${NONPROD_RO_ROLE_ARN}

  PublicZone:
    Name: dev.my-domain.net
    Lookup:
      RoleArn: ${NONPROD_RO_ROLE_ARN}

  Records:
    - Properties:
        Name: controlcenter.dev.my-domain.net
        Type: A
      Target: x-elbv2::controlcenter