Skip to content

Commit 5a26169

Browse files
committed
use namespace_id
1 parent dc904fa commit 5a26169

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

internal/provider/routes_data_source.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ type RoutesDataSource struct {
2525
}
2626

2727
type RoutesDataSourceModel 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-
Routes []RouteModel `tfsdk:"routes"`
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+
Routes []RouteModel `tfsdk:"routes"`
34+
TotalCount types.Int64 `tfsdk:"total_count"`
3535
}
3636

3737
func (d *RoutesDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
@@ -42,7 +42,7 @@ func (d *RoutesDataSource) Schema(_ context.Context, _ datasource.SchemaRequest,
4242
resp.Schema = schema.Schema{
4343
MarkdownDescription: "List all routes",
4444
Attributes: map[string]schema.Attribute{
45-
"namespace": schema.StringAttribute{
45+
"namespace_id": schema.StringAttribute{
4646
Optional: true,
4747
Description: "Namespace to list routes in.",
4848
},
@@ -105,7 +105,7 @@ func (d *RoutesDataSource) Read(ctx context.Context, req datasource.ReadRequest,
105105
}
106106

107107
listReq := &pb.ListRoutesRequest{
108-
Namespace: data.Namespace.ValueString(),
108+
Namespace: data.NamespaceID.ValueString(),
109109
Query: data.Query.ValueStringPointer(),
110110
Offset: data.Offset.ValueInt64Pointer(),
111111
Limit: data.Limit.ValueInt64Pointer(),

0 commit comments

Comments
 (0)