Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for wildcars #8

Open
punqbund opened this issue Nov 30, 2021 · 5 comments
Open

Support for wildcars #8

punqbund opened this issue Nov 30, 2021 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@punqbund
Copy link
Contributor

Please add support for updating wildcard DNS records like *.mydomain.com. This would help me to update the IP address for all subdomains at once.

@punqbund
Copy link
Contributor Author

Never mind, I got it running by providing the record name as "*" (asterisk surrounded by double quotes). Maybe you should mention it in the documentation.

@kutzilla
Copy link
Owner

kutzilla commented Dec 1, 2021

Hey @punqbund,

thank you for your feature request. That's a good point. The default behavior is updating the *-Record anyway. The CNAME values should be updated automatically by the *-Record. But if i understand you correctly, you would like to update more A- or AAAA-Records, right?

Additionally i could add a parameter to provide multiple subdomains. This makes it explicit. What do you think?
This could be helpful for subdomains, that should be not updated.

Cheers,
kutzilla

@kutzilla kutzilla added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 1, 2021
@punqbund
Copy link
Contributor Author

punqbund commented Dec 2, 2021

Hi @kutzilla , right, it's about updating A-records in my case. I want to update both the A-record for mydomain.com and the A-record for *.mydomain.com at the same time.
Regarding your idea about an additional parameter to explicitly specify multiple subdomains: I think that makes sense. Maybe you could number the RECORD_NAME parameters:

docker run \
-e ZONE_NAME=example.com \ 
-e HETZNER_API_TOKEN=my-secret-api-token \
-e ZONE_RECORD_TYPE=A \
-e RECORD_NAME "@" \
-e RECORD_NAME1 suba \
-e RECORD_NAME2 subb \
kutzilla/hetzner-dns

Thinking this further, perhaps ZONE_RECORD_TYPE A and AAAA could be supported at the same time using the same principle:

docker run \
-e ZONE_NAME=example.com \ 
-e HETZNER_API_TOKEN=my-secret-api-token \
-e ZONE_RECORD_TYPE=A \
-e RECORD_NAME suba \
-e ZONE_RECORD_TYPE1=AAAA \
-e RECORD_NAME1 subb \
kutzilla/hetzner-ddns

@kutzilla
Copy link
Owner

kutzilla commented Dec 4, 2021

Good point. To keep it dynamically, I suggest to define a new environment variable ZONES_CONF to provide a JSON structure to update multiple records. Like this:

{
 "apiToken" : "my-secret-api-token",
 "records" : [
   {
     "recordType" : "A",
     "name" : "example1"
   },
   {
     "recordType" : "A",
     "name" : "example2"
   }
  ]
}

What do you think?

@punqbund
Copy link
Contributor Author

punqbund commented Dec 4, 2021

@kutzilla I think this would be a nice solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants