From ff23675d9feedea1a2591ea52e31863a88262cad Mon Sep 17 00:00:00 2001 From: sfang97 Date: Fri, 11 Sep 2020 15:10:16 -0500 Subject: [PATCH] Remove managed and enabled for now --- gitlab/resource_gitlab_instance_cluster.go | 6 ++++++ website/docs/r/instance_cluster.html.markdown | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gitlab/resource_gitlab_instance_cluster.go b/gitlab/resource_gitlab_instance_cluster.go index fc9f58691..7579e8834 100644 --- a/gitlab/resource_gitlab_instance_cluster.go +++ b/gitlab/resource_gitlab_instance_cluster.go @@ -33,11 +33,13 @@ func resourceGitlabInstanceCluster() *schema.Resource { Type: schema.TypeBool, Optional: true, Default: true, + ForceNew: true, }, "managed": { Type: schema.TypeBool, Optional: true, Default: true, + ForceNew: true, }, "created_at": { Type: schema.TypeString, @@ -214,6 +216,10 @@ func resourceGitlabInstanceClusterUpdate(d *schema.ResourceData, meta interface{ pk.CaCert = gitlab.String(d.Get("kubernetes_ca_cert").(string)) } + if d.HasChange("namespace") { + pk.Namespace = gitlab.String(d.Get("namespace").(string)) + } + if *pk != (gitlab.EditPlatformKubernetesOptions{}) { options.PlatformKubernetes = pk } diff --git a/website/docs/r/instance_cluster.html.markdown b/website/docs/r/instance_cluster.html.markdown index 3c42f3019..ea3947428 100644 --- a/website/docs/r/instance_cluster.html.markdown +++ b/website/docs/r/instance_cluster.html.markdown @@ -43,7 +43,7 @@ The following arguments are supported: - `kubernetes_api_url` - (Required, string) The URL to access the Kubernetes API. -- `kubernetes_token` - (Required, string) The token to authenticate against Kubernetes. +- `kubernetes_token` - (Required, string) The token to authenticate against Kubernetes. This attribute cannot be read. - `kubernetes_ca_cert` - (Optional, string) TLS certificate (needed if API is using a self-signed TLS certificate). @@ -53,7 +53,7 @@ The following arguments are supported: - `environment_scope` - (Optional, string) The associated environment to the cluster. Defaults to `*`. -- `management_project_id` - (Optional, string) The ID of the management instance for the cluster. +- `management_project_id` - (Optional, string) The ID of the management project for the cluster. ## Import