3913b3920d
Terraform provider (plugin-framework) for the tomswall fleet control plane. Resources: zone, address_group (static/dns/asn, with computed resolved prefixes), portgroup, fabric, device, binding (device:zone), and rule. Each resource does full CRUD against the tomswallapi HTTP API with bearer-token auth and ImportState support; rules recreate on update since the rules API is create/delete only. Includes Makefile with make patch|minor|major release tags, Woodpecker pre-commit/build/test/release pipelines (release publishes to the artifactapi terraform registry), README, and a worked example.
32 lines
787 B
Go
32 lines
787 B
Go
// Command terraform-provider-tomswallapi is the Terraform/OpenTofu provider for
|
|
// tomswallapi: it manages the fleet-global firewall model (zones, address groups,
|
|
// portgroups, rules, policies, fabrics) and per-device zone->interface bindings.
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"flag"
|
|
"log"
|
|
|
|
"github.com/hashicorp/terraform-plugin-framework/providerserver"
|
|
|
|
"git.unkin.net/unkin/terraform-provider-tomswallapi/internal/provider"
|
|
)
|
|
|
|
var version = "0.0.1"
|
|
|
|
func main() {
|
|
var debug bool
|
|
flag.BoolVar(&debug, "debug", false, "enable debug mode")
|
|
flag.Parse()
|
|
|
|
opts := providerserver.ServeOpts{
|
|
Address: "git.unkin.net/unkin/tomswallapi",
|
|
Debug: debug,
|
|
}
|
|
|
|
if err := providerserver.Serve(context.Background(), provider.New(version), opts); err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|