diff --git a/docs/azure.md b/docs/azure.md index c925b7311..6c08c65c1 100644 --- a/docs/azure.md +++ b/docs/azure.md @@ -22,13 +22,44 @@ ### Compulsory parameters -- `"domain"` -- `"host"` is your host and can be a subdomain or `"@"` -- `"subscription_id"` -- `"resource_group_name"` -- `"zone_name"` -- `"relative_record_set_name"` +- `"domain"` for Web UI purposes only +- `"host"` for Web UI purposes only +- `"app_id"` see [the domain setup section](#Domain-setup) +- `"app_password"` see [the domain setup section](#Domain-setup) +- `"subscription_id"` found in the properties section of Azure DNS +- `"resource_group_name"` found in the properties section of Azure DNS +- `"relative_record_set_name"` **TODO** +- `"zone_name"` found in the properties section of Azure DNS ### Optional parameters +- `"ip_version"` can be `ipv4` (A records) or `ipv6` (AAAA records), defaults to `ipv4 or ipv6` + ## Domain setup + +Thanks to @danimart1991 for describing the following steps! + +1. Create Domain +1. Activate Azure DNS Zone for that domain +1. Find the following parameters in the Properties section of Azure DNS: + - The name or URL `AnyNameOrUrl` for the query below **TODO** + - `subscription_id` + - `resource_group_name` + - `zone_name` +1. In the Azure Console (inside the portal), run: + + ```sh + az ad sp create-for-rbac -n "$AnyNameOrUrl" --scopes "/subscriptions/$subscription_id/resourceGroups/$resource_group_name/providers/Microsoft.Network/dnszones/$zone_name" + ``` + + This gives you the rest of the parameters: + + ```json + { + "appId": "{app_id/client_id}", + "displayName": "not important", + "name": "not important", + "password": "{app_password}", + "tenant": "not important" + } + ``` diff --git a/internal/settings/azure.go b/internal/settings/azure.go index 49a6d334d..26d92e44b 100644 --- a/internal/settings/azure.go +++ b/internal/settings/azure.go @@ -102,7 +102,6 @@ func (a *azure) HTML() models.HTMLRow { } func (a *azure) Update(ctx context.Context, client netlib.Client, ip net.IP) (newIP net.IP, err error) { - // https://docs.microsoft.com/en-us/rest/api/dns/recordsets/update#uri-parameters recordType := A if ip.To4() == nil { recordType = AAAA