Skip to content

Commit a118a87

Browse files
committed
add provider schema
1 parent 22eedc4 commit a118a87

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tpfprovider/tpfprovider.go

+10-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@ package tpfprovider
22

33
import (
44
"context"
5+
"net/url"
56

67
"github.com/hashicorp/terraform-plugin-framework/datasource"
78
"github.com/hashicorp/terraform-plugin-framework/provider"
89
"github.com/hashicorp/terraform-plugin-framework/provider/schema"
910
"github.com/hashicorp/terraform-plugin-framework/resource"
1011
)
1112

12-
type coderProvider struct{}
13+
type coderProvider struct {
14+
URL *url.URL
15+
}
1316

1417
var _ provider.Provider = (*coderProvider)(nil)
1518

@@ -27,7 +30,12 @@ func (p *coderProvider) DataSources(_ context.Context) []func() datasource.DataS
2730

2831
func (p *coderProvider) Schema(_ context.Context, _ provider.SchemaRequest, resp *provider.SchemaResponse) {
2932
resp.Schema = schema.Schema{
30-
Attributes: map[string]schema.Attribute{},
33+
Attributes: map[string]schema.Attribute{
34+
"url": schema.StringAttribute{
35+
Description: "The URL to access Coder.",
36+
Optional: true,
37+
},
38+
},
3139
}
3240
}
3341

0 commit comments

Comments
 (0)