diff --git a/Makefile b/Makefile index 28513ce3..e720d0b9 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,11 @@ BIN_NAME="terraform-provider-instaclustr" -VERSION=v1.9.1 -.PHONY: install clean all build test testacc testtarget +VERSION=v1.9.2 + +.PHONY: install clean all build test testacc testtarget release_version +release_version: + @echo $(VERSION) all: build diff --git a/README.md b/README.md index 9d8090f3..37e26405 100644 --- a/README.md +++ b/README.md @@ -171,3 +171,5 @@ Please see https://www.instaclustr.com/support/documentation/announcements/insta # License Apache2 - See the included LICENSE file for more details. + +Test diff --git a/instaclustr/resource_cluster.go b/instaclustr/resource_cluster.go index 0fc5b3d9..913dad4c 100644 --- a/instaclustr/resource_cluster.go +++ b/instaclustr/resource_cluster.go @@ -630,7 +630,7 @@ func resourceClusterRead(d *schema.ResourceData, meta interface{}) error{ d.Set("cluster_name", cluster.ClusterName) clusterProvider := make(map[string]interface{}, 0) - mapstructure.Decode(cluster.Provider, &clusterProvider) + mapstructure.Decode(cluster.Provider[0], &clusterProvider) processedClusterProvider := processProvider(d, clusterProvider) d.Set("cluster_provider", processedClusterProvider) @@ -727,7 +727,9 @@ func getBundlesFromCluster(cluster *Cluster) ([]map[string]interface{}, error) { bundles := make([]map[string]interface{}, 0) bundles = append(bundles, baseBundle) if cluster.AddonBundles != nil { - bundles = append(bundles, cluster.AddonBundles) + for _, addonBundle := range cluster.AddonBundles{ + bundles = append(bundles, addonBundle) + } } return bundles, nil diff --git a/instaclustr/structs.go b/instaclustr/structs.go index db6bf9c5..91571ca6 100644 --- a/instaclustr/structs.go +++ b/instaclustr/structs.go @@ -95,7 +95,7 @@ type Cluster struct { ClusterStatus string `json:"clusterStatus"` BundleType string `json:"bundleType"` BundleVersion string `json:"bundleVersion"` - AddonBundles map[string]interface{} `json:"addonBundles"` + AddonBundles []map[string]interface{} `json:"addonBundles"` Username string `json:"username"` InstaclustrUserPassword string `json:"instaclustrUserPassword"` SlaTier string `json:"slaTier"` @@ -103,7 +103,7 @@ type Cluster struct { PciCompliance string `json:"pciCompliance"` BundleOption *BundleOptions `json:"bundleOptions"` DataCentres []DataCentre `json:"dataCentres"` - Provider ClusterProvider `json:"clusterProvider"` + Provider []ClusterProvider `json:"clusterProvider"` } type DataCentre struct { diff --git a/test/data/valid_kafka.tf b/test/data/valid_kafka.tf index 698ca257..97aecd86 100644 --- a/test/data/valid_kafka.tf +++ b/test/data/valid_kafka.tf @@ -36,5 +36,9 @@ resource "instaclustr_cluster" "valid" { bundle = "KAFKA_SCHEMA_REGISTRY" version = "kafka-schema-registry:5.0.0" } + bundle { + bundle = "KAFKA_REST_PROXY" + version = "kafka-rest-proxy:5.0.0" + } }