diff --git a/docs/resources/device_gateway_cluster.md b/docs/resources/device_gateway_cluster.md index a40c46f8..b3b7f45d 100644 --- a/docs/resources/device_gateway_cluster.md +++ b/docs/resources/device_gateway_cluster.md @@ -41,7 +41,7 @@ resource "mist_device_gateway_cluster" "cluster_one" { ### Read-Only -- `device_id` (String) +- `id` (String) The ID of this resource. ### Nested Schema for `nodes` diff --git a/internal/resource_device_gateway_cluster/sdk_to_terraform.go b/internal/resource_device_gateway_cluster/sdk_to_terraform.go index 18cf1d04..3c87611d 100644 --- a/internal/resource_device_gateway_cluster/sdk_to_terraform.go +++ b/internal/resource_device_gateway_cluster/sdk_to_terraform.go @@ -15,7 +15,7 @@ func SdkToTerraform(ctx context.Context, siteId uuid.UUID, deviceId uuid.UUID, d var state DeviceGatewayClusterModel var diags diag.Diagnostics - var device_id types.String = types.StringValue(deviceId.String()) + var id types.String = types.StringValue(deviceId.String()) var nodes types.List = types.ListNull(NodesValue{}.Type(ctx)) var site_id types.String = types.StringValue(siteId.String()) @@ -38,7 +38,7 @@ func SdkToTerraform(ctx context.Context, siteId uuid.UUID, deviceId uuid.UUID, d nodes, e := types.ListValueFrom(ctx, data_list_type, nodes_list) diags.Append(e...) - state.DeviceId = device_id + state.Id = id state.Nodes = nodes state.SiteId = site_id