Skip to content

Commit

Permalink
fix: missing vds info with r/cluster import
Browse files Browse the repository at this point in the history
Address missing `vds` info with `r/cluster` import.

Signed-off-by: Jared Burns <jared.burns@broadcom.com>
  • Loading branch information
burnsjared0415 committed Sep 4, 2024
1 parent 1da138e commit 54a5a65
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions internal/cluster/cluster_operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ func FlattenCluster(ctx context.Context, clusterObj *models.Cluster, apiClient *
if err != nil {
return nil, err
}

result["host"] = flattenedHostSpecs

return &result, nil
Expand All @@ -400,15 +401,9 @@ func ImportCluster(ctx context.Context, data *schema.ResourceData, apiClient *cl
_ = data.Set("is_default", clusterObj.IsDefault)
_ = data.Set("is_stretched", clusterObj.IsStretched)
flattenedVdsSpecs := getFlattenedVdsSpecsForRefs(clusterObj.VdsSpecs)
if err != nil {
return nil, err
}
_ = data.Set("vds", flattenedVdsSpecs)

flattenedHostSpecs, err := getFlattenedHostSpecsForRefs(ctx, clusterObj.Hosts, apiClient)
if err != nil {
return nil, err
}
_ = data.Set("host", flattenedHostSpecs)

//get all domains and find our cluster to set the "domain_id" attribute, because
Expand Down

0 comments on commit 54a5a65

Please sign in to comment.