From 64252129d14af86e22180feefa713b148a170df0 Mon Sep 17 00:00:00 2001 From: Tom Limoncelli Date: Sat, 16 May 2026 08:49:11 -0400 Subject: [PATCH] AZURE_PRIVATE_DNS: support init command Register CredsMetadata so the AZURE_PRIVATE_DNS provider appears in the `dnscontrol init` wizard. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../azurePrivateDnsProvider.go | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/providers/azureprivatedns/azurePrivateDnsProvider.go b/providers/azureprivatedns/azurePrivateDnsProvider.go index e6c4cfc22b..bbf76c80b9 100644 --- a/providers/azureprivatedns/azurePrivateDnsProvider.go +++ b/providers/azureprivatedns/azurePrivateDnsProvider.go @@ -91,6 +91,45 @@ func init() { providers.RegisterDomainServiceProviderType(providerName, fns, features) providers.RegisterCustomRecordType("AZURE_ALIAS", providerName, "") providers.RegisterMaintainer(providerName, providerMaintainer) + providers.RegisterCredsMetadata(providerName, providers.CredsMetadata{ + DisplayName: "Azure Private DNS", + Kind: providers.KindDNS, + DocsURL: "https://docs.dnscontrol.org/provider/azureprivatedns", + PortalURL: "https://portal.azure.com/", // TODO: Verify + Fields: []providers.CredsField{ + { + Key: "SubscriptionID", + Label: "Subscription ID", + Help: "Azure subscription ID that contains the private DNS zones.", + Required: true, + }, + { + Key: "ResourceGroup", + Label: "Resource group", + Help: "Azure resource group that contains the private DNS zones.", + Required: true, + }, + { + Key: "TenantID", + Label: "Tenant ID", + Help: "Azure AD tenant ID for the service principal.", + Required: true, + }, + { + Key: "ClientID", + Label: "Client ID", + Help: "Service principal client (application) ID.", + Required: true, + }, + { + Key: "ClientSecret", + Label: "Client secret", + Help: "Service principal client secret.", + Secret: true, + Required: true, + }, + }, + }) } func (a *azurednsProvider) getExistingZones() ([]*adns.PrivateZone, error) {