x-dns ¶
See also
For more structural details, see JSON Schema
PrivateNamespace (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) ¶
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 ¶
x-dns:
PrivateNamespace:
Name: mycluster.lan
x-dns:
PrivateNamespace:
Name: mycluster.lan
Use: ns-abcd012344
PublicZone:
Name: public-domain.net
Use: Z0123456ABCD
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
JSON Schema ¶
x-dns ¶
x-dns.spec.json |
|||
x-dns specification |
|||
type |
object |
||
properties |
|||
|
type |
object |
|
#/definitions/PrivateNamespace |
|||
|
type |
object |
|
#/definitions/PublicZone |
|||
|
type |
array |
|
items |
#/definitions/Record |
||
additionalProperties |
False |
||
definitions |
|||
|
type |
string |
|
format |
idn-hostname |
||
|
type |
object |
|
properties |
|||
|
type |
string / object |
|
|
#/definitions/ZoneName |
||
|
type |
string |
|
pattern |
ns-[a-z0-9]+$ |
||
|
type |
object |
|
properties |
|||
|
type |
string / object |
|
|
#/definitions/ZoneName |
||
|
type |
string |
|
pattern |
Z[A-Z0-9]+$ |
||
|
type |
object |
|
properties |
|||
|
type |
object |
|
|
type |
string |
|
additionalProperties |
False |
{
"$schema": "http://json-schema.org/draft-07/schema#",
"id": "x-dns.spec.json",
"$id": "x-dns.spec.json",
"title": "x-dns",
"description": "x-dns specification",
"type": "object",
"definitions": {
"ZoneName": {
"type": "string",
"format": "idn-hostname"
},
"PrivateNamespace": {
"type": "object",
"required": [
"Name"
],
"properties": {
"Lookup": {
"type": [
"string",
"object"
]
},
"Name": {
"$ref": "#/definitions/ZoneName"
},
"Use": {
"type": "string",
"pattern": "ns-[a-z0-9]+$"
}
}
},
"PublicZone": {
"type": "object",
"required": [
"Name"
],
"properties": {
"Lookup": {
"type": [
"string",
"object"
]
},
"Name": {
"$ref": "#/definitions/ZoneName"
},
"Use": {
"type": "string",
"pattern": "Z[A-Z0-9]+$"
}
}
},
"Record": {
"type": "object",
"required": [
"Properties",
"Target"
],
"additionalProperties": false,
"properties": {
"Properties": {
"type": "object"
},
"Target": {
"type": "string"
}
}
}
},
"properties": {
"PrivateNamespace": {
"type": "object",
"$ref": "#/definitions/PrivateNamespace"
},
"PublicZone": {
"type": "object",
"$ref": "#/definitions/PublicZone"
},
"Records": {
"type": "array",
"items": {
"$ref": "#/definitions/Record"
}
}
},
"additionalProperties": false
}