forked from Snowflake-Labs/terraform-provider-snowflake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
34 lines (28 loc) · 762 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
26
27
28
29
30
31
32
33
34
package main
import (
"flag"
"fmt"
"log"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/provider"
"github.com/chanzuckerberg/go-misc/ver"
"github.com/hashicorp/terraform-plugin-sdk/v2/plugin"
)
const ProviderAddr = "registry.terraform.io/Snowflake-Labs/snowflake"
func main() {
version := flag.Bool("version", false, "spit out version for resources here")
debug := flag.Bool("debug", false, "set to true to run the provider with support for debuggers like delve")
flag.Parse()
if *version {
verString, err := ver.VersionStr()
if err != nil {
log.Fatal(err)
}
fmt.Println(verString)
return
}
plugin.Serve(&plugin.ServeOpts{
Debug: *debug,
ProviderAddr: ProviderAddr,
ProviderFunc: provider.Provider,
})
}