Skip to content

Commit 5895951

Browse files
Julien LevasseurJulien Levasseur
authored andcommitted
Update main.go
1 parent 9cc38f9 commit 5895951

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

main.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
package main
22

33
import (
4-
"github.com/hashicorp/terraform-plugin-sdk/v2/plugin"
4+
"context"
5+
"log"
6+
7+
"github.com/hashicorp/terraform-plugin-framework/providerserver"
58
"github.com/julienlevasseur/terraform-provider-uname/internal/provider"
69
)
710

811
func main() {
9-
plugin.Serve(&plugin.ServeOpts{
10-
ProviderFunc: provider.Provider,
12+
err := providerserver.Serve(context.Background(), provider.New, providerserver.ServeOpts{
13+
Address: "registry.terraform.io/julienlevasseur/uname",
14+
ProtocolVersion: 5,
1115
})
16+
if err != nil {
17+
log.Fatal(err)
18+
}
1219
}

0 commit comments

Comments
 (0)