-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.go
37 lines (30 loc) · 858 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
35
36
37
package main
import (
"context"
"flag"
"log"
"github.com/camptocamp/terraform-provider-puppetdb/internal/datasources"
"github.com/camptocamp/terraform-provider-puppetdb/internal/provider"
"github.com/camptocamp/terraform-provider-puppetdb/internal/resources"
"github.com/hashicorp/terraform-plugin-framework/providerserver"
)
var (
name = "puppetdb"
version = "dev"
address = "registry.terraform.io/camptocamp/" + name
)
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()
err := providerserver.Serve(
context.Background(),
provider.NewFactory(name, version, datasources.DataSources(), resources.Resources()),
providerserver.ServeOpts{
Address: address,
Debug: debug,
})
if err != nil {
log.Fatal(err.Error())
}
}