dns_azure

This commit is contained in:
Jamie Curnow 2022-06-01 09:02:57 +04:00
parent 91d23be4e3
commit 07739ee84e
4 changed files with 75 additions and 1 deletions

View File

@ -40,6 +40,7 @@ func List() []Provider {
getDNSAli(),
getDNSAws(),
getDNSAutoDNS(),
getDNSAzure(),
getDNSCf(),
getDNSCloudns(),
getDNSCx(),

View File

@ -48,7 +48,7 @@ func getDNSAutoDNS() Provider {
},
{
Name: "Context",
Type: "string",
Type: "text",
MetaKey: "context",
EnvKey: "AUTODNS_CONTEXT",
IsRequired: true,

View File

@ -0,0 +1,70 @@
package dnsproviders
const azureSchema = `
{
"type": "object",
"required": [
"subscription_id",
"tenant_id",
"app_id",
"client_secret"
],
"additionalProperties": false,
"properties": {
"subscription_id": {
"type": "string",
"minLength": 1
},
"tenant_id": {
"type": "string",
"minLength": 1
},
"app_id": {
"type": "string",
"minLength": 1
},
"client_secret": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSAzure() Provider {
return Provider{
AcmeshName: "dns_azure",
Schema: azureSchema,
Fields: []providerField{
{
Name: "Subscription ID",
Type: "text",
MetaKey: "subscription_id",
EnvKey: "AZUREDNS_SUBSCRIPTIONID",
IsRequired: true,
},
{
Name: "Tenant ID",
Type: "text",
MetaKey: "tenant_id",
EnvKey: "AZUREDNS_TENANTID",
IsRequired: true,
},
{
Name: "APP ID",
Type: "text",
MetaKey: "app_id",
EnvKey: "AZUREDNS_APPID",
IsRequired: true,
},
{
Name: "Client Secret",
Type: "password",
MetaKey: "client_secret",
EnvKey: "AZUREDNS_CLIENTSECRET",
IsRequired: true,
IsSecret: true,
},
},
}
}

View File

@ -14,6 +14,9 @@
"acmesh.dns_autodns": {
"defaultMessage": "autoDNS (InternetX)"
},
"acmesh.dns_azure": {
"defaultMessage": "Azure"
},
"acmesh.dns_cf": {
"defaultMessage": "Cloudflare"
},