You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[after the migration](https://github.com/hashicorp/terraform-provider-http/blob/8527d5b4546b54cdef246a13befc5745dbbbf740/internal/provider/data_source_http.go).
111
-
112
103
### SDKv2
113
104
114
-
The following example from the `provider.go` file shows an implementation of the `DataSourcesMap` field on the provider
105
+
The following example shows an implementation of the `DataSourcesMap` field on the provider
115
106
schema with SDKv2.
116
107
117
108
```go
118
109
funcNew() (*schema.Provider, error) {
119
110
return &schema.Provider {
120
111
DataSourcesMap: map[string]*schema.Resource {
121
-
"http": dataSource(),
112
+
"example_datasource": exampleDataSource(),
122
113
/* ... */
123
114
```
124
115
125
-
The following example from the `data_source.go` file shows how the `ReadContext` function and `Schema` are defined for
126
-
the `http` data source with SDKv2.
116
+
The following example shows how the `ReadContext` function and `Schema` are defined for
117
+
the `exampleResource` data source with SDKv2.
127
118
128
119
```go
129
-
funcdataSource() *schema.Resource {
120
+
funcexampleDataSource() *schema.Resource {
130
121
return &schema.Resource{
131
122
ReadContext: dataSourceRead,
132
123
133
124
Schema: map[string]*schema.Schema{
134
-
"url": {
135
-
Description: "The URL for the request. Supported schemes are `http` and `https`.",
0 commit comments