diff --git a/main.go b/main.go index 83a6cd92..7f409c55 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,7 @@ package main import ( + "flag" "github.com/1Password/terraform-provider-onepassword/onepassword" "github.com/hashicorp/terraform-plugin-sdk/v2/plugin" ) @@ -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, }) }