DNS - Wildcard
Reference for the humanitec/dns-wildcard driver
This driver generates a new subdomain for a domain. It is intended for used with a wildcard DNS record.
Property
Description
Resource Type
dns
Account Type
None

Inputs

Values

Name
Type
Description
domain
string
The domain under which to specify the subdomain. E.g. staging.example.com

Secrets

Name
Type
Description
tls
object
A TLS certificate in Kubernetes certificate format. E.g. {"tls.crt": "...", "tls.key": "..."}
The TLS certificate must be a wildcard certificate valid for subdomains of the domain value. E.g. for staging.example.com, the certificate must include *.staging.example.com as an CN or SAN.

Notes

There must be a wildcard DNS Record configured for the domain name specified in domain. The record should point to the appropriate Load Balancer.

Example

In this example, we use the humantec/dns-wildcard driver to provision new subdomains under staging.hosted-domain.com for an app called dns-example-app.
Then following Dynamic Resource Definition should be added:
1
curl https://api.humanitec.io/orgs/my-org/resources/defs \
2
-X POST \
3
-H "Authorization: Bearer $HUMANITEC_TOKEN" \
4
-H "Content-Type: application/json" \
5
--data-binary '{
6
"id": "dynamic-dns",
7
"name": "Dynamic DNS",
8
"type": "dns",
9
"criteria": [
10
{
11
"app_id": "dns-example-app"
12
}
13
],
14
"driver_type": "humanitec/dns-wildcard",
15
"driver_inputs": {
16
"values": {
17
"domain": "staging.hosted-domain.com"
18
},
19
"secrets": {
20
"tls": {
21
"tls.crt": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n",
22
"tls.key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
23
}
24
}
25
}
26
}'
Copied!
Last modified 2mo ago