diff --git a/gen/definitions/network_device_group.yaml b/gen/definitions/network_device_group.yaml index 385053b6..8f9ea019 100644 --- a/gen/definitions/network_device_group.yaml +++ b/gen/definitions/network_device_group.yaml @@ -14,7 +14,7 @@ attributes: type: String description: Description example: My network device group - - model_name: othername + - model_name: ndgtype tf_name: root_group data_path: [NetworkDeviceGroup] type: String diff --git a/internal/provider/model_ise_network_device_group.go b/internal/provider/model_ise_network_device_group.go index ed3fa1f0..2ea756d6 100644 --- a/internal/provider/model_ise_network_device_group.go +++ b/internal/provider/model_ise_network_device_group.go @@ -57,7 +57,7 @@ func (data NetworkDeviceGroup) toBody(ctx context.Context, state NetworkDeviceGr body, _ = sjson.Set(body, "NetworkDeviceGroup.description", data.Description.ValueString()) } if !data.RootGroup.IsNull() { - body, _ = sjson.Set(body, "NetworkDeviceGroup.othername", data.RootGroup.ValueString()) + body, _ = sjson.Set(body, "NetworkDeviceGroup.ndgtype", data.RootGroup.ValueString()) } return body } @@ -76,7 +76,7 @@ func (data *NetworkDeviceGroup) fromBody(ctx context.Context, res gjson.Result) } else { data.Description = types.StringNull() } - if value := res.Get("NetworkDeviceGroup.othername"); value.Exists() { + if value := res.Get("NetworkDeviceGroup.ndgtype"); value.Exists() { data.RootGroup = types.StringValue(value.String()) } else { data.RootGroup = types.StringNull() @@ -97,7 +97,7 @@ func (data *NetworkDeviceGroup) updateFromBody(ctx context.Context, res gjson.Re } else { data.Description = types.StringNull() } - if value := res.Get("NetworkDeviceGroup.othername"); value.Exists() && !data.RootGroup.IsNull() { + if value := res.Get("NetworkDeviceGroup.ndgtype"); value.Exists() && !data.RootGroup.IsNull() { data.RootGroup = types.StringValue(value.String()) } else { data.RootGroup = types.StringNull()