forked from Telmate/terraform-provider-proxmox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
25 lines (18 loc) · 690 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package main
import (
"flag"
"github.com/Telmate/terraform-provider-proxmox/proxmox"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/plugin"
)
func main() {
var debugMode bool
var pluginPath string
flag.BoolVar(&debugMode, "debug", false, "set to true to run the provider with support for debuggers like delve")
flag.StringVar(&pluginPath, "registry", "registry.terraform.io/telmate/proxmox", "specify path, useful for local debugging")
flag.Parse()
opts := &plugin.ServeOpts{ProviderFunc: func() *schema.Provider {
return proxmox.Provider()
}, Debug: debugMode, ProviderAddr: pluginPath}
plugin.Serve(opts)
}