mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-31 07:43:33 +00:00 
			
		
		
		
	dns_azure
This commit is contained in:
		| @@ -40,6 +40,7 @@ func List() []Provider { | |||||||
| 		getDNSAli(), | 		getDNSAli(), | ||||||
| 		getDNSAws(), | 		getDNSAws(), | ||||||
| 		getDNSAutoDNS(), | 		getDNSAutoDNS(), | ||||||
|  | 		getDNSAzure(), | ||||||
| 		getDNSCf(), | 		getDNSCf(), | ||||||
| 		getDNSCloudns(), | 		getDNSCloudns(), | ||||||
| 		getDNSCx(), | 		getDNSCx(), | ||||||
|   | |||||||
| @@ -48,7 +48,7 @@ func getDNSAutoDNS() Provider { | |||||||
| 			}, | 			}, | ||||||
| 			{ | 			{ | ||||||
| 				Name:       "Context", | 				Name:       "Context", | ||||||
| 				Type:       "string", | 				Type:       "text", | ||||||
| 				MetaKey:    "context", | 				MetaKey:    "context", | ||||||
| 				EnvKey:     "AUTODNS_CONTEXT", | 				EnvKey:     "AUTODNS_CONTEXT", | ||||||
| 				IsRequired: true, | 				IsRequired: true, | ||||||
|   | |||||||
							
								
								
									
										70
									
								
								backend/internal/dnsproviders/dns_azure.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										70
									
								
								backend/internal/dnsproviders/dns_azure.go
									
									
									
									
									
										Normal 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, | ||||||
|  | 			}, | ||||||
|  | 		}, | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -14,6 +14,9 @@ | |||||||
| 	"acmesh.dns_autodns": { | 	"acmesh.dns_autodns": { | ||||||
| 		"defaultMessage": "autoDNS (InternetX)" | 		"defaultMessage": "autoDNS (InternetX)" | ||||||
| 	}, | 	}, | ||||||
|  | 	"acmesh.dns_azure": { | ||||||
|  | 		"defaultMessage": "Azure" | ||||||
|  | 	}, | ||||||
| 	"acmesh.dns_cf": { | 	"acmesh.dns_cf": { | ||||||
| 		"defaultMessage": "Cloudflare" | 		"defaultMessage": "Cloudflare" | ||||||
| 	}, | 	}, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user