From f1d4679b65524596e716e0167687410c637127ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20N=C3=A4gele?= Date: Tue, 8 Oct 2024 15:26:11 +0200 Subject: [PATCH] sat location name now mutable --- ibm/service/satellite/resource_ibm_satellite_location.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ibm/service/satellite/resource_ibm_satellite_location.go b/ibm/service/satellite/resource_ibm_satellite_location.go index 41d43c1750..fc932fa846 100644 --- a/ibm/service/satellite/resource_ibm_satellite_location.go +++ b/ibm/service/satellite/resource_ibm_satellite_location.go @@ -65,7 +65,7 @@ func ResourceIBMSatelliteLocation() *schema.Resource { return flex.ResourceTagsCustomizeDiff(diff) }, func(_ context.Context, diff *schema.ResourceDiff, v interface{}) error { - return flex.ImmutableResourceCustomizeDiff([]string{satLocation, sateLocZone, "resource_group_id", "zones"}, diff) + return flex.ImmutableResourceCustomizeDiff([]string{sateLocZone, "resource_group_id", "zones"}, diff) }, ), @@ -471,14 +471,14 @@ func resourceIBMSatelliteLocationUpdate(d *schema.ResourceData, meta interface{} } func resourceIBMSatelliteLocationDelete(d *schema.ResourceData, meta interface{}) error { + ID := d.Id() satClient, err := meta.(conns.ClientSession).SatelliteClientSession() if err != nil { return err } removeSatLocOptions := &kubernetesserviceapiv1.RemoveSatelliteLocationOptions{} - name := d.Get(satLocation).(string) - removeSatLocOptions.Controller = &name + removeSatLocOptions.Controller = &ID response, err := satClient.RemoveSatelliteLocation(removeSatLocOptions) if err != nil && response.StatusCode != 404 { @@ -486,7 +486,7 @@ func resourceIBMSatelliteLocationDelete(d *schema.ResourceData, meta interface{} } //Wait for location to delete - _, err = waitForLocationDelete(name, d, meta) + _, err = waitForLocationDelete(ID, d, meta) if err != nil { return fmt.Errorf("[ERROR] Error waiting for deleting location instance: %s", err) }