@@ -3,6 +3,7 @@ package provider
33import (
44 "context"
55 "fmt"
6+ "strconv"
67
78 "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
89 "github.com/hashicorp/terraform-plugin-framework/datasource"
@@ -27,7 +28,7 @@ type entityDataSource struct {
2728
2829// ExampleDataSourceModel describes the data source data model.
2930type EntityDataSourceModel struct {
30- Id types.Int64 `tfsdk:"id"`
31+ Id types.String `tfsdk:"id"`
3132 Name types.String `tfsdk:"name"`
3233 Type types.String `tfsdk:"type"`
3334 ParentID types.Int64 `tfsdk:"parent_id"`
@@ -44,7 +45,7 @@ func (d *entityDataSource) Schema(ctx context.Context, req datasource.SchemaRequ
4445 MarkdownDescription : "Data source to access the attributes of a BlueCat entity." ,
4546
4647 Attributes : map [string ]schema.Attribute {
47- "id" : schema.Int64Attribute {
48+ "id" : schema.StringAttribute {
4849 MarkdownDescription : "Entity identifier" ,
4950 Computed : true ,
5051 },
@@ -126,7 +127,7 @@ func (d *entityDataSource) Read(ctx context.Context, req datasource.ReadRequest,
126127 return
127128 }
128129
129- data .Id = types .Int64Value ( * entity .Id )
130+ data .Id = types .StringValue ( strconv . FormatInt ( * entity .Id , 10 ) )
130131 data .Properties = types .StringValue (* entity .Properties )
131132
132133 resp .Diagnostics .Append (clientLogout (ctx , & client , mutex )... )
0 commit comments