@@ -25,13 +25,13 @@ type PoliciesDataSource struct {
25
25
}
26
26
27
27
type PoliciesDataSourceModel struct {
28
- Namespace types.String `tfsdk:"namespace "`
29
- Query types.String `tfsdk:"query"`
30
- Offset types.Int64 `tfsdk:"offset"`
31
- Limit types.Int64 `tfsdk:"limit"`
32
- OrderBy types.String `tfsdk:"order_by"`
33
- Policies []PolicyModel `tfsdk:"policies"`
34
- TotalCount types.Int64 `tfsdk:"total_count"`
28
+ NamespaceID types.String `tfsdk:"namespace_id "`
29
+ Query types.String `tfsdk:"query"`
30
+ Offset types.Int64 `tfsdk:"offset"`
31
+ Limit types.Int64 `tfsdk:"limit"`
32
+ OrderBy types.String `tfsdk:"order_by"`
33
+ Policies []PolicyModel `tfsdk:"policies"`
34
+ TotalCount types.Int64 `tfsdk:"total_count"`
35
35
}
36
36
37
37
func (d * PoliciesDataSource ) Metadata (_ context.Context , req datasource.MetadataRequest , resp * datasource.MetadataResponse ) {
@@ -43,7 +43,7 @@ func (d *PoliciesDataSource) Schema(_ context.Context, _ datasource.SchemaReques
43
43
MarkdownDescription : "List all policies" ,
44
44
45
45
Attributes : map [string ]schema.Attribute {
46
- "namespace " : schema.StringAttribute {
46
+ "namespace_id " : schema.StringAttribute {
47
47
Optional : true ,
48
48
Description : "Namespace to list policies in." ,
49
49
},
@@ -145,7 +145,7 @@ func (d *PoliciesDataSource) Read(ctx context.Context, req datasource.ReadReques
145
145
}
146
146
147
147
listReq := & pb.ListPoliciesRequest {
148
- Namespace : data .Namespace .ValueString (),
148
+ Namespace : data .NamespaceID .ValueString (),
149
149
Query : data .Query .ValueStringPointer (),
150
150
Offset : data .Offset .ValueInt64Pointer (),
151
151
Limit : data .Limit .ValueInt64Pointer (),
0 commit comments