From 4124c4c3b87e736b237a72d2985994ea39e8cd1b Mon Sep 17 00:00:00 2001 From: Shane Gill Date: Fri, 13 Oct 2023 11:57:37 +1000 Subject: [PATCH] Chore: finish lifecycle space conversion --- octopusdeploy/resource_lifecycle.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/octopusdeploy/resource_lifecycle.go b/octopusdeploy/resource_lifecycle.go index 93b707938..c71dbee5e 100644 --- a/octopusdeploy/resource_lifecycle.go +++ b/octopusdeploy/resource_lifecycle.go @@ -61,7 +61,7 @@ func resourceLifecycleRead(ctx context.Context, d *schema.ResourceData, m interf log.Printf("[INFO] reading lifecycle (%s)", d.Id()) client := m.(*client.Client) - lifecycle, err := client.Lifecycles.GetByID(d.Id()) + lifecycle, err := lifecycles.GetByID(client, d.Get("space_id").(string), d.Id()) if err != nil { return errors.ProcessApiError(ctx, d, err, "lifecycle") } @@ -80,7 +80,7 @@ func resourceLifecycleUpdate(ctx context.Context, d *schema.ResourceData, m inte lifecycle := expandLifecycle(d) client := m.(*client.Client) - updatedLifecycle, err := client.Lifecycles.Update(lifecycle) + updatedLifecycle, err := lifecycles.Update(client, lifecycle) if err != nil { return diag.FromErr(err) }