feat: support and document attaching a debugger to the provider (#617)

* feat: support and document attaching a debugger to the provider

* chore: fix documentation
This commit is contained in:
Rüdiger Schmitz 2025-01-16 09:34:58 +01:00 committed by GitHub
parent f04ced9981
commit b2a9f0921e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 43 additions and 29 deletions

View file

@ -2,6 +2,7 @@ package main
import (
"context"
"flag"
"log"
"github.com/hashicorp/terraform-plugin-framework/providerserver"
@ -14,8 +15,12 @@ var (
)
func main() {
var debug bool
flag.BoolVar(&debug, "debug", false, "allows debugging the provider")
flag.Parse()
err := providerserver.Serve(context.Background(), stackit.New(version), providerserver.ServeOpts{
Address: "registry.terraform.io/stackitcloud/stackit",
Debug: debug,
})
if err != nil {
log.Fatal(err.Error())