Skip to content

Commit

Permalink
Add ProviderAddr and Debug to plugin.Serve for debugging support
Browse files Browse the repository at this point in the history
  • Loading branch information
williamhpark committed Oct 19, 2023
1 parent 1fd0de9 commit 6c25a42
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"flag"
"github.com/1Password/terraform-provider-onepassword/onepassword"
"github.com/hashicorp/terraform-plugin-sdk/v2/plugin"
)
Expand All @@ -16,7 +17,14 @@ import (
//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs

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()

plugin.Serve(&plugin.ServeOpts{
ProviderFunc: onepassword.Provider,
ProviderAddr: "1Password/onepassword",
Debug: debug,
})
}

0 comments on commit 6c25a42

Please sign in to comment.