diff --git a/octopusdeploy/resource_gcp_account.go b/octopusdeploy/resource_gcp_account.go index e13aa297d..3d4b3e6e2 100644 --- a/octopusdeploy/resource_gcp_account.go +++ b/octopusdeploy/resource_gcp_account.go @@ -29,7 +29,7 @@ func resourceGoogleCloudPlatformAccountCreate(ctx context.Context, d *schema.Res log.Printf("[INFO] creating GCP account: %#v", account) client := m.(*client.Client) - createdAccount, err := client.Accounts.Add(account) + createdAccount, err := accounts.Add(client, account) if err != nil { return diag.FromErr(err) } @@ -48,7 +48,7 @@ func resourceGoogleCloudPlatformAccountDelete(ctx context.Context, d *schema.Res log.Printf("[INFO] deleting GCP account (%s)", d.Id()) client := m.(*client.Client) - if err := client.Accounts.DeleteByID(d.Id()); err != nil { + if err := accounts.DeleteByID(client, d.Get("space_id").(string), d.Id()); err != nil { return diag.FromErr(err) } @@ -62,7 +62,7 @@ func resourceGoogleCloudPlatformAccountRead(ctx context.Context, d *schema.Resou log.Printf("[INFO] reading GCP account (%s)", d.Id()) client := m.(*client.Client) - accountResource, err := client.Accounts.GetByID(d.Id()) + accountResource, err := accounts.GetByID(client, d.Get("space_id").(string), d.Id()) if err != nil { return errors.ProcessApiError(ctx, d, err, "GCP account") } @@ -82,7 +82,7 @@ func resourceGoogleCloudPlatformAccountUpdate(ctx context.Context, d *schema.Res log.Printf("[INFO] updating GCP account: %#v", account) client := m.(*client.Client) - updatedAccount, err := client.Accounts.Update(account) + updatedAccount, err := accounts.Update(client, account) if err != nil { return diag.FromErr(err) }