main: Add -debug flag for enabling debugger support (#27)
Reference: https://github.com/hashicorp/terraform-provider-scaffolding-framework/issues/8
This commit is contained in:
parent
dc4be578e8
commit
f1449bfe5c
8
main.go
8
main.go
@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"flag"
|
||||
"log"
|
||||
|
||||
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
|
||||
@ -28,7 +29,14 @@ var (
|
||||
)
|
||||
|
||||
func main() {
|
||||
var debug bool
|
||||
|
||||
flag.BoolVar(&debug, "debug", false, "set to true to run the provider with support for debuggers like delve")
|
||||
flag.Parse()
|
||||
|
||||
opts := tfsdk.ServeOpts{
|
||||
Debug: debug,
|
||||
|
||||
// TODO: Update this string with the published name of your provider.
|
||||
Name: "registry.terraform.io/hashicorp/scaffolding",
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user