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:
parent
f04ced9981
commit
b2a9f0921e
2 changed files with 43 additions and 29 deletions
5
main.go
5
main.go
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue