From dfd54cf2dbaf20605036816e9e9237ba84cc9293 Mon Sep 17 00:00:00 2001 From: Buster Styren Date: Tue, 21 Mar 2023 08:49:24 +0100 Subject: [PATCH] fix: Store region name in cluster resource (#21) * fix: Store region name in cluster resource * chore: update symbiosis-go pkg --- docs/resources/cluster.md | 1 + go.mod | 2 +- go.sum | 2 ++ symbiosis/resource_cluster.go | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/resources/cluster.md b/docs/resources/cluster.md index 9c23f52..5b15262 100644 --- a/docs/resources/cluster.md +++ b/docs/resources/cluster.md @@ -49,6 +49,7 @@ resource "symbiosis_cluster" "example" { - **endpoint** (String) Cluster API server endpoint - **kubeconfig** (String, Sensitive) The raw kubeconfig file. - **private_key** (String, Sensitive) +- **state** (String) Cluster state [PENDING, DELETE_IN_PROGRESS, ACTIVE, FAILED] ### Nested Schema for `timeouts` diff --git a/go.mod b/go.mod index 7e0fe3b..17ea7ae 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.7.0 - github.com/symbiosis-cloud/symbiosis-go v1.1.7 + github.com/symbiosis-cloud/symbiosis-go v1.1.8 ) require ( diff --git a/go.sum b/go.sum index 6e59b23..abb97b6 100644 --- a/go.sum +++ b/go.sum @@ -306,6 +306,8 @@ github.com/symbiosis-cloud/symbiosis-go v1.0.12 h1:3SZwA4wkg9peSihzerzFEee1bB4r7 github.com/symbiosis-cloud/symbiosis-go v1.0.12/go.mod h1:NKZUsxo8/H1SnAxKo+RC/SHmUuaQILkdNAXN7LthjQ4= github.com/symbiosis-cloud/symbiosis-go v1.1.7 h1:ocOCLGzp7g11U29DBnOYNH+VE2ap/lEst9CEDfBQJWQ= github.com/symbiosis-cloud/symbiosis-go v1.1.7/go.mod h1:NKZUsxo8/H1SnAxKo+RC/SHmUuaQILkdNAXN7LthjQ4= +github.com/symbiosis-cloud/symbiosis-go v1.1.8 h1:D3NE4DUh4dnIuSvOWQKfRlJNn/16vEGx57F9jMjYlLs= +github.com/symbiosis-cloud/symbiosis-go v1.1.8/go.mod h1:NKZUsxo8/H1SnAxKo+RC/SHmUuaQILkdNAXN7LthjQ4= github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ= github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= diff --git a/symbiosis/resource_cluster.go b/symbiosis/resource_cluster.go index 7863895..5392e94 100644 --- a/symbiosis/resource_cluster.go +++ b/symbiosis/resource_cluster.go @@ -183,6 +183,7 @@ func resourceClusterRead(ctx context.Context, d *schema.ResourceData, meta inter d.Set("name", cluster.Name) d.Set("state", cluster.State) d.Set("endpoint", cluster.APIServerEndpoint) + d.Set("region", cluster.Region.Name) d.Set("is_highly_available", cluster.IsHighlyAvailable) d.Set("certificate", identity.CertificatePem) d.Set("ca_certificate", identity.ClusterCertificateAuthorityPem)