-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathmain.go
29 lines (24 loc) · 776 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
package main
import (
"context"
"github.com/hashicorp/terraform-plugin-go/tfprotov5"
"github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server"
"github.com/hashicorp/terraform-plugin-mux/tf5muxserver"
"github.com/iwarapter/terraform-provider-jwks/internal/sdkv2provider"
)
//go:generate terraform fmt -recursive ./examples/
//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
func main() {
ctx := context.Background()
providers := []func() tfprotov5.ProviderServer{
sdkv2provider.Provider().GRPCProvider,
}
muxServer, err := tf5muxserver.NewMuxServer(ctx, providers...)
if err != nil {
panic(err)
}
err = tf5server.Serve("registry.terraform.io/iwarapter/jwks", muxServer.ProviderServer)
if err != nil {
panic(err)
}
}