Skip to content

Commit f4add1d

Browse files
committed
PLT-1807: Fixed add on deployment for cp
Signed-off-by: Sivaanand Murugesan <[email protected]>
1 parent 8abed7a commit f4add1d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

spectrocloud/resource_cluster_attachment.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,14 @@ func resourceAddonDeploymentRead(_ context.Context, d *schema.ResourceData, m in
142142
var diags diag.Diagnostics
143143

144144
clusterUid := d.Get("cluster_uid").(string)
145+
if !strings.Contains(d.Id(), clusterUid) {
146+
d.SetId("")
147+
return diags
148+
}
149+
145150
cluster, err := c.GetCluster(clusterUid)
146151
if err != nil {
147-
return handleReadError(d, err, diags)
152+
return diag.FromErr(err)
148153
}
149154

150155
diagnostics, done := readAddonDeployment(c, d, cluster)

0 commit comments

Comments
 (0)