-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
Provider: Azure #109
Comments
Hey danimart1991, thanks for creating the issue. I digged a bit in Azure's API documentation to update DNS records, particularly here. I just have a questions on some of the required parameters, can you please let me know for each if it's easy to get them and how:
That would help to know if I should search through their API how to obtain these if it's not trivial to have them. Also for authentication, it seems you only use |
You can try with Also, does Azure support wildcard Thanks! |
Hi @qdm12 Yes. Azure support wilcard *. I create a first approach in Python + Container in case it works for you. Azure needs a lot of parameters and configuration. Steps to configure Azure to be able to external dynamic dns update:
I use this parameters here: https://github.com/danimart1991/azure-dns-updater/blob/main/azure-dns-updater.py#L21 Best regards and thank you for your work. |
Sorry for the rather long delay, I worked on the implementation again today; I'm just lost on authentication. How do you specify the app_id and app_password? Or do you even need to? From what I've seen in their docs, a PATCH HTTP request like
Does it. Do you know if that's the case perhaps? |
Hi @qdm12 As I need this DNS Updater, I make my own, but even better if DDNS Updater has Azure too. 🥰 I just update my repository with all the info to obtain the info needed to update a record/s. https://github.com/danimart1991/azure-dns-updater The I use the Python lib DnsManagementClient directly, I just need to send the Update command and fill the needed vars. 🤔 |
@qdm12 did you try using Azure SDK? the SDK usually is especially useful for the authentication part https://github.com/Azure/azure-sdk-for-go/blob/f111fc2fa3861c5fdced76cae4c9c71821969577/arm/examples/dns/create.go |
Oh they have a Go SDK! Thanks @fredericrous !! 🎉 Yeah I tried quite a bit, but would get lost in the over-complicated requirements from their API docs to be honest. I'll try that right now! |
Any news with this? Can I help? |
Hi @danimart1991, I don't think qdm12 has picked this up yet. I don't require a new domain at the moment and don't have one on Azure but feel free to open a PR, we'll review it. Implementing a provider is not that hard, I implemented 3 already and I'm not a Go developer. |
Actually Azure has been quite tough. Implementing it dependency-free is a bit of a PITA. For now I prefer to focus on improving the "vertical aspect" of ddns such as upgrading the UI or better support for ipv6 before doing "horizontal" such as adding more DNS providers. Although if you can manage to do a PR for Azure without dependency, I'm more than happy to merge it! |
Thanks for the answer @qdm12 Actually, I don't know Go to be able to add new DNS providers. So sorry. |
Microsoft has got some documentation on the API here: |
Hello everyone, I reworked the Azure branch to use the Azure SDK for the time being. Can you try the image In the meantime, I'm working on having this without the Azure SDK (just plain local Go), and I'm really eyeing using a single |
I updated qmcgaw/ddns-updater:pr-130 to use that token field and no Azure SDK, please let me know if it works when you get the time. Documentation: Line 1 in 8e39ff0
|
Thanks @qdm12 for the work. I'm trying the option to use client_id and client_secret (it's the option that I use actually with Traefik for reverse proxy), but then ddns-updater gives me the error "ERROR validating settings: token is not set". Maybe the provider could accept both options? 🤔 |
Well, it could maybe, but the programming using the token authentication is really a lot easier. Is it complicated to get a token? If it's too hardcore (or doesn't work) I'll work my way to support only client id+ client secret+tenant id instead. |
The problem is that the Token expires in 1 hour. |
Indeed (and up to 1 day which doesn't work in this use case), my bad I didn't notice this. |
With the Azure SDK, it works like a charm. 😇 |
What's the feature?
Include Azure DNS as provider please
Why do you need this feature?
I have a home server with Azure DNS and Azure Domains and would be awesome to have automatic ddns update.
Extra information?
Thanks. Many thanks for all.
The text was updated successfully, but these errors were encountered: