Skip to content

Commit b845463

Browse files
broswenstainless-app[bot]
authored andcommitted
fix(list) data source
1 parent 65eebe3 commit b845463

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

internal/services/list/data_source.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func (d *ListDataSource) Read(ctx context.Context, req datasource.ReadRequest, r
6767
env := ListResultDataSourceEnvelope{*data}
6868
_, err := d.client.Rules.Lists.Get(
6969
ctx,
70-
data.ListID.ValueString(),
70+
data.ID.ValueString(),
7171
params,
7272
option.WithResponseBodyInto(&res),
7373
option.WithMiddleware(logging.Middleware(ctx)),

internal/services/list/data_source_model.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ type ListResultDataSourceEnvelope struct {
1616
}
1717

1818
type ListDataSourceModel struct {
19-
ID types.String `tfsdk:"id" path:"list_id,computed"`
20-
ListID types.String `tfsdk:"list_id" path:"list_id,optional"`
19+
ID types.String `tfsdk:"id" path:"id,required"`
2120
AccountID types.String `tfsdk:"account_id" path:"account_id,required"`
2221
CreatedOn types.String `tfsdk:"created_on" json:"created_on,computed"`
2322
Description types.String `tfsdk:"description" json:"description,computed"`

internal/services/list/data_source_schema.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ func DataSourceSchema(ctx context.Context) schema.Schema {
1818
Attributes: map[string]schema.Attribute{
1919
"id": schema.StringAttribute{
2020
Description: "The unique ID of the list.",
21-
Computed: true,
22-
},
23-
"list_id": schema.StringAttribute{
24-
Description: "The unique ID of the list.",
25-
Optional: true,
21+
Required: true,
2622
},
2723
"account_id": schema.StringAttribute{
2824
Description: "The Account ID for this resource.",

0 commit comments

Comments
 (0)