Plugin-framework provider covering projects, environments, applications, Compose stacks, managed databases, domains, mounts, ports, redirects, basic auth, registries, SSH keys, certificates and backup destinations, over Dokploy's tRPC-over-REST API. The shim package exposes the provider to other Go modules, which is how pulumi-dokploy bridges it.
31 lines
785 B
Go
31 lines
785 B
Go
// terraform-provider-dokploy manages Dokploy projects, environments, services,
|
|
// databases and networking through Terraform or OpenTofu.
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"flag"
|
|
"log"
|
|
|
|
"github.com/hashicorp/terraform-plugin-framework/providerserver"
|
|
|
|
"github.com/maxvojtkov/terraform-provider-dokploy/internal/provider"
|
|
)
|
|
|
|
// version is overridden at build time with -ldflags "-X main.version=..."
|
|
var version = "dev"
|
|
|
|
func main() {
|
|
var debug bool
|
|
flag.BoolVar(&debug, "debug", false, "run the provider with support for debuggers such as delve")
|
|
flag.Parse()
|
|
|
|
err := providerserver.Serve(context.Background(), provider.New(version), providerserver.ServeOpts{
|
|
Address: "registry.terraform.io/maxvojtkov/dokploy",
|
|
Debug: debug,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|