Skip to content

Commit d76b81e

Browse files
authored
Merge pull request #539 from hashicorp/f-add-debug-cmmand-line-flag
Add `-debug` command-line flag
2 parents e992373 + 4777624 commit d76b81e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

main.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@ package main
22

33
import (
44
"context"
5+
"flag"
56

67
"github.com/hashicorp/terraform-plugin-framework/providerserver"
78
"github.com/hashicorp/terraform-provider-awscc/internal/provider"
89
)
910

1011
func main() {
12+
var debugMode bool
13+
14+
flag.BoolVar(&debugMode, "debug", false, "set to true to run the provider with support for debuggers like delve")
15+
flag.Parse()
16+
1117
providerserver.Serve(context.Background(), provider.New, providerserver.ServeOpts{
1218
Address: "registry.terraform.io/hashicorp/awscc",
19+
Debug: debugMode,
1320
})
1421
}

0 commit comments

Comments
 (0)