forked from PrefectHQ/terraform-provider-prefect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
25 lines (19 loc) · 755 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 (
"fmt"
"os"
"github.com/hashicorp/terraform-plugin-framework/providerserver"
"github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server"
"github.com/prefecthq/terraform-provider-prefect/internal/provider"
)
const providerAddress = "registry.terraform.io/prefecthq/prefect"
// Run "go generate" to generate the docs
//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs generate --rendered-provider-name Prefect --provider-name prefect
func main() {
providerServer := providerserver.NewProtocol6(&provider.PrefectProvider{})
err := tf6server.Serve(providerAddress, providerServer)
if err != nil {
fmt.Fprintf(os.Stderr, "failed to start starting plugin server: %s", err)
os.Exit(1)
}
}