@@ -6,7 +6,6 @@ package provider
66import (
77 "context"
88 "fmt"
9- "net/http"
109
1110 "github.com/hashicorp/terraform-plugin-framework/datasource"
1211 "github.com/hashicorp/terraform-plugin-framework/datasource/schema"
@@ -23,7 +22,7 @@ func NewExampleDataSource() datasource.DataSource {
2322
2423// ExampleDataSource defines the data source implementation.
2524type ExampleDataSource struct {
26- client * http. Client
25+ data * CoderdProviderData
2726}
2827
2928// ExampleDataSourceModel describes the data source data model.
@@ -60,18 +59,18 @@ func (d *ExampleDataSource) Configure(ctx context.Context, req datasource.Config
6059 return
6160 }
6261
63- client , ok := req .ProviderData .(* http. Client )
62+ client , ok := req .ProviderData .(* CoderdProviderData )
6463
6564 if ! ok {
6665 resp .Diagnostics .AddError (
67- "Unexpected Data Source Configure Type" ,
68- fmt .Sprintf ("Expected *http.Client , got: %T. Please report this issue to the provider developers." , req .ProviderData ),
66+ "Unexpected Resource Configure Type" ,
67+ fmt .Sprintf ("Expected *CoderdProviderData , got: %T. Please report this issue to the provider developers." , req .ProviderData ),
6968 )
7069
7170 return
7271 }
7372
74- d .client = client
73+ d .data = client
7574}
7675
7776func (d * ExampleDataSource ) Read (ctx context.Context , req datasource.ReadRequest , resp * datasource.ReadResponse ) {
0 commit comments