Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Dec 13, 2020
1 parent 843bbd8 commit 675adec
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 7 deletions.
43 changes: 37 additions & 6 deletions docs/azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
```
1 change: 0 additions & 1 deletion internal/settings/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 675adec

Please sign in to comment.