diff --git a/internal/datasource_org_inventory/sdk_to_terraform.go b/internal/datasource_org_inventory/sdk_to_terraform.go index 817dfe3..410dd05 100644 --- a/internal/datasource_org_inventory/sdk_to_terraform.go +++ b/internal/datasource_org_inventory/sdk_to_terraform.go @@ -2,7 +2,6 @@ package datasource_org_inventory import ( "context" - "math/big" "github.com/tmunzer/mistapi-go/mistapi/models" @@ -27,7 +26,6 @@ func inventorySdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d mod var adopted basetypes.BoolValue var claim_code basetypes.StringValue var connected basetypes.BoolValue - var created_time basetypes.NumberValue var deviceprofile_id basetypes.StringValue var hostname basetypes.StringValue var hw_rev basetypes.StringValue @@ -35,7 +33,6 @@ func inventorySdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d mod var jsi basetypes.BoolValue var mac basetypes.StringValue var model basetypes.StringValue - var modified_time basetypes.NumberValue var name basetypes.StringValue var org_id basetypes.StringValue var serial basetypes.StringValue @@ -50,9 +47,6 @@ func inventorySdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d mod if d.Connected != nil { connected = types.BoolValue(*d.Connected) } - if d.CreatedTime != nil { - created_time = types.NumberValue(big.NewFloat(*d.CreatedTime)) - } if d.DeviceprofileId.Value() != nil { deviceprofile_id = types.StringValue(*d.DeviceprofileId.Value()) } @@ -77,9 +71,6 @@ func inventorySdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d mod if d.Model != nil { model = types.StringValue(*d.Model) } - if d.ModifiedTime != nil { - modified_time = types.NumberValue(big.NewFloat(*d.ModifiedTime)) - } if d.Name != nil { name = types.StringValue(*d.Name) } @@ -107,7 +98,6 @@ func inventorySdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d mod "adopted": adopted, "claim_code": claim_code, "connected": connected, - "created_time": created_time, "deviceprofile_id": deviceprofile_id, "hostname": hostname, "hw_rev": hw_rev, @@ -115,7 +105,6 @@ func inventorySdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d mod "jsi": jsi, "mac": mac, "model": model, - "modified_time": modified_time, "name": name, "org_id": org_id, "serial": serial, diff --git a/internal/resource_org_inventory/sdk_to_terraform_legacy.go b/internal/resource_org_inventory/sdk_to_terraform_legacy.go index 666d4aa..b344256 100644 --- a/internal/resource_org_inventory/sdk_to_terraform_legacy.go +++ b/internal/resource_org_inventory/sdk_to_terraform_legacy.go @@ -80,18 +80,18 @@ func legacyProcessMistInventory( data_map_attr_type := DevicesValue{}.AttributeTypes(ctx) data_map_value := map[string]attr.Value{ - "claim_code": claim_code, "deviceprofile_id": deviceprofile_id, + "hostname": hostname, + "id": id, "mac": mac, + "claim_code": claim_code, "model": model, "org_id": org_id, "serial": serial, "site_id": site_id, "type": device_type, - "vc_mac": vc_mac, - "hostname": hostname, "unclaim_when_destroyed": unclaim_when_destroyed, - "id": id, + "vc_mac": vc_mac, } newDevice, e := NewDevicesValue(data_map_attr_type, data_map_value) diags.Append(e...)