Skip to content

Commit

Permalink
Merge pull request #103 from 1Password/wpark/102-debugging-support
Browse files Browse the repository at this point in the history
Add support to run provider with debuggers
  • Loading branch information
volodymyrZotov authored Nov 28, 2023
2 parents ba2f48f + 6c25a42 commit 8f6401e
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 8f6401e

Please sign in to comment.