Remove UseStateForUnknown for kubeconfig field in ske cluster (#258)

* Remove UseStateForUnknown

* Fix acc test
This commit is contained in:
Vicente Pinto 2024-02-09 11:59:34 +00:00 committed by GitHub
parent bde1fc55e4
commit e9b2d7aa91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 4 deletions

View file

@ -503,9 +503,6 @@ func (r *clusterResource) Schema(_ context.Context, _ resource.SchemaRequest, re
Sensitive: true,
Computed: true,
DeprecationMessage: "This field will be empty for clusters with Kubernetes v1.27+, or if you have obtained the kubeconfig or performed credentials rotation using the new process, either through the Portal or the SKE API. Use the stackit_ske_kubeconfig resource instead. For more information, see How to rotate SKE credentials (https://docs.stackit.cloud/stackit/en/how-to-rotate-ske-credentials-200016334.html).",
PlanModifiers: []planmodifier.String{
stringplanmodifier.UseStateForUnknown(),
},
},
},
}

View file

@ -506,7 +506,7 @@ func TestAccSKE(t *testing.T) {
resource.TestCheckResourceAttr("stackit_ske_cluster.cluster", "maintenance.start", clusterResource["maintenance_start"]),
resource.TestCheckResourceAttr("stackit_ske_cluster.cluster", "maintenance.end", clusterResource["maintenance_end_new"]),
resource.TestCheckResourceAttrSet("stackit_ske_cluster.cluster", "kube_config"),
resource.TestCheckNoResourceAttr("stackit_ske_cluster.cluster", "kube_config"), // when using the kubeconfig resource, the kubeconfig field becomes null
),
},
// Deletion is done by the framework implicitly