From 68b91a6b755c5bef655f2c382058549902d97fab Mon Sep 17 00:00:00 2001 From: Tom Limoncelli Date: Sat, 16 May 2026 08:49:45 -0400 Subject: [PATCH] FORTIGATE: support init command Register CredsMetadata so the FORTIGATE provider appears in the `dnscontrol init` wizard. Co-Authored-By: Claude Opus 4.7 (1M context) --- providers/fortigate/fortigateProvider.go | 37 ++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/providers/fortigate/fortigateProvider.go b/providers/fortigate/fortigateProvider.go index 8fddf2989f..ce295ff231 100644 --- a/providers/fortigate/fortigateProvider.go +++ b/providers/fortigate/fortigateProvider.go @@ -33,6 +33,43 @@ func init() { RecordAuditor: AuditRecords, }, features) providers.RegisterMaintainer(providerName, providerMaintainer) + providers.RegisterCredsMetadata(providerName, providers.CredsMetadata{ + DisplayName: "FortiGate", + Kind: providers.KindDNS, + DocsURL: "https://docs.dnscontrol.org/provider/fortigate", + PortalURL: "https://docs.fortinet.com/", // TODO: Verify + Fields: []providers.CredsField{ + { + Key: "host", + Label: "FortiGate host", + Help: "Hostname or IP of the FortiGate appliance (with or without https://).", + Required: true, + }, + { + Key: "vdom", + Label: "VDOM", + Help: "FortiGate virtual domain (vdom) name.", + Required: true, + }, + { + Key: "apiKey", + Label: "API key", + Help: "FortiGate REST API key.", + Secret: true, + Required: true, + }, + { + Key: "insecure_tls", + Label: "Skip TLS verification (optional)", + Help: "Set to \"true\" to skip TLS certificate verification when connecting to the FortiGate.", + }, + { + Key: "debug_http", + Label: "Debug HTTP (optional)", + Help: "Set to \"true\" to log HTTP requests and responses for debugging.", + }, + }, + }) } // Provider Struct