We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d90c181 commit 1aed712Copy full SHA for 1aed712
main.go
@@ -1,6 +1,8 @@
1
package main
2
3
import (
4
+ "flag"
5
+
6
"github.com/hashicorp/terraform-plugin-sdk/v2/plugin"
7
8
"github.com/coder/terraform-provider-coder/v2/provider"
@@ -11,8 +13,15 @@ import (
11
13
//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
12
14
15
func main() {
- servePprof()
- plugin.Serve(&plugin.ServeOpts{
16
+ debug := flag.Bool("debug", false, "Enable debug mode for the provider")
17
+ flag.Parse()
18
19
+ opts := &plugin.ServeOpts{
20
+ Debug: *debug,
21
+ ProviderAddr: "registry.terraform.io/coder/coder",
22
ProviderFunc: provider.New,
- })
23
+ }
24
25
+ servePprof()
26
+ plugin.Serve(opts)
27
}
0 commit comments