Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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