From 15eaf02420f9005a0bd93f9cf4b24bd5238de838 Mon Sep 17 00:00:00 2001 From: Vladimir Ermakov Date: Wed, 1 Nov 2023 16:24:45 +0100 Subject: [PATCH] fix init with wrong client --- provider.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/provider.go b/provider.go index 6f28735..b3c25e0 100644 --- a/provider.go +++ b/provider.go @@ -62,12 +62,12 @@ func (g *InstanceGroup) Init(ctx context.Context, log hclog.Logger, settings pro var cluster *clusters.Cluster if g.ClusterID != "" { - cluster, err = clusters.Get(cli, g.ClusterID).Extract() + cluster, err = clusters.Get(g.clusteringClient, g.ClusterID).Extract() if err != nil { return provider.ProviderInfo{}, fmt.Errorf("Failed to get cluster by id: %w", err) } } else { - page, err := clusters.List(cli, clusters.ListOpts{Name: g.Name}).AllPages() + page, err := clusters.List(g.clusteringClient, clusters.ListOpts{Name: g.Name}).AllPages() if err != nil { return provider.ProviderInfo{}, fmt.Errorf("Failed to get cluster by name: %w", err) }