From 16250f371cf262fe4f89f9c25e9b42b03db6a8a9 Mon Sep 17 00:00:00 2001 From: Thomas Munzer Date: Tue, 27 Aug 2024 10:51:20 +0200 Subject: [PATCH] replace cluster device_id by id --- docs/resources/device_gateway_cluster.md | 2 +- internal/resource_device_gateway_cluster/sdk_to_terraform.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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