-
Notifications
You must be signed in to change notification settings - Fork 9
/
main.go
33 lines (28 loc) · 771 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
package main
import (
"context"
"os"
"github.com/hashicorp/terraform-plugin-framework/provider"
"github.com/hashicorp/terraform-plugin-framework/providerserver"
"github.com/joneshf/terraform-provider-openwrt/openwrt"
)
// Provider documentation generation.
//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs generate --provider-name openwrt
const (
// version is set by the linker flag `-X main.version=<some-version>`.
version = "unknown"
)
func main() {
ctx := context.Background()
providerNew := func() provider.Provider {
return openwrt.New(version, os.LookupEnv)
}
options := providerserver.ServeOpts{
Address: "registry.terraform.io/joneshf/openwrt",
}
providerserver.Serve(
ctx,
providerNew,
options,
)
}