Skip to content

Commit

Permalink
PLT-678: Address review comments, docs and fixed unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
nikchern committed Sep 22, 2023
1 parent 3e534a5 commit ea15ede
Show file tree
Hide file tree
Showing 31 changed files with 99 additions and 7 deletions.
8 changes: 8 additions & 0 deletions docs/data-sources/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ resource "local_file" "kubeconfig" {
file_permission = "0644"
directory_permission = "0755"
}
resource "local_file" "adminkubeconfig" {
content = data.spectrocloud_cluster.cluster.admin_kube_config
filename = "admin-client-101.kubeconfig"
file_permission = "0644"
directory_permission = "0755"
}
```

<!-- schema generated by tfplugindocs -->
Expand All @@ -39,6 +46,7 @@ resource "local_file" "kubeconfig" {

### Read-Only

- `admin_kube_config` (String)
- `id` (String) The ID of this resource.
- `kube_config` (String)

Expand Down
1 change: 1 addition & 0 deletions docs/resources/cluster_aks.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ resource "spectrocloud_cluster_aks" "cluster" {

### Read-Only

- `admin_kube_config` (String) Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.
- `cloud_config_id` (String, Deprecated) ID of the cloud config used for the cluster. This cloud config must be of type `azure`.
- `id` (String) The ID of this resource.
- `kubeconfig` (String) Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.
Expand Down
1 change: 1 addition & 0 deletions docs/resources/cluster_aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ resource "spectrocloud_cluster_aws" "cluster" {

### Read-Only

- `admin_kube_config` (String) Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.
- `cloud_config_id` (String, Deprecated) ID of the cloud config used for the cluster. This cloud config must be of type `azure`.
- `id` (String) The ID of this resource.
- `kubeconfig` (String) Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.
Expand Down
1 change: 1 addition & 0 deletions docs/resources/cluster_azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ resource "spectrocloud_cluster_azure" "cluster" {

### Read-Only

- `admin_kube_config` (String) Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.
- `cloud_config_id` (String, Deprecated) ID of the cloud config used for the cluster. This cloud config must be of type `azure`.
- `id` (String) The ID of this resource.
- `kubeconfig` (String) Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.
Expand Down
1 change: 1 addition & 0 deletions docs/resources/cluster_coxedge.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ description: |-

### Read-Only

- `admin_kube_config` (String) Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.
- `cloud_config_id` (String, Deprecated) ID of the cloud config used for the cluster. This cloud config must be of type `azure`.
- `id` (String) The ID of this resource.
- `kubeconfig` (String) Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.
Expand Down
1 change: 1 addition & 0 deletions docs/resources/cluster_edge_native.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ description: |-

### Read-Only

- `admin_kube_config` (String) Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.
- `cloud_config_id` (String, Deprecated) ID of the cloud config used for the cluster. This cloud config must be of type `azure`.
- `id` (String) The ID of this resource.
- `kubeconfig` (String) Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.
Expand Down
1 change: 1 addition & 0 deletions docs/resources/cluster_edge_vsphere.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ description: |-

### Read-Only

- `admin_kube_config` (String) Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.
- `cloud_config_id` (String, Deprecated) ID of the cloud config used for the cluster. This cloud config must be of type `azure`.
- `id` (String) The ID of this resource.
- `kubeconfig` (String) Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.
Expand Down
1 change: 1 addition & 0 deletions docs/resources/cluster_eks.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ resource "spectrocloud_cluster_eks" "cluster" {

### Read-Only

- `admin_kube_config` (String) Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.
- `cloud_config_id` (String, Deprecated) ID of the cloud config used for the cluster. This cloud config must be of type `azure`.
- `id` (String) The ID of this resource.
- `kubeconfig` (String) Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.
Expand Down
1 change: 1 addition & 0 deletions docs/resources/cluster_gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ resource "spectrocloud_cluster_gcp" "cluster" {

### Read-Only

- `admin_kube_config` (String) Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.
- `cloud_config_id` (String, Deprecated) ID of the cloud config used for the cluster. This cloud config must be of type `azure`.
- `id` (String) The ID of this resource.
- `kubeconfig` (String) Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.
Expand Down
1 change: 1 addition & 0 deletions docs/resources/cluster_libvirt.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ description: |-

### Read-Only

- `admin_kube_config` (String) Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.
- `cloud_config_id` (String, Deprecated) ID of the cloud config used for the cluster. This cloud config must be of type `azure`.
- `id` (String) The ID of this resource.
- `kubeconfig` (String) Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.
Expand Down
1 change: 1 addition & 0 deletions docs/resources/cluster_maas.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ resource "spectrocloud_cluster_maas" "cluster" {

### Read-Only

- `admin_kube_config` (String) Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.
- `cloud_config_id` (String, Deprecated) ID of the cloud config used for the cluster. This cloud config must be of type `azure`.
- `id` (String) The ID of this resource.
- `kubeconfig` (String) Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.
Expand Down
1 change: 1 addition & 0 deletions docs/resources/cluster_openstack.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ resource "spectrocloud_cluster_openstack" "cluster" {

### Read-Only

- `admin_kube_config` (String) Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.
- `cloud_config_id` (String, Deprecated) ID of the cloud config used for the cluster. This cloud config must be of type `azure`.
- `id` (String) The ID of this resource.
- `kubeconfig` (String) Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.
Expand Down
1 change: 1 addition & 0 deletions docs/resources/cluster_tke.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ description: |-

### Read-Only

- `admin_kube_config` (String) Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.
- `cloud_config_id` (String, Deprecated) ID of the cloud config used for the cluster. This cloud config must be of type `azure`.
- `id` (String) The ID of this resource.
- `kubeconfig` (String) Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.
Expand Down
1 change: 1 addition & 0 deletions docs/resources/cluster_vsphere.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ description: |-

### Read-Only

- `admin_kube_config` (String) Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.
- `cloud_config_id` (String, Deprecated) ID of the cloud config used for the cluster. This cloud config must be of type `azure`.
- `id` (String) The ID of this resource.
- `kubeconfig` (String) Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.
Expand Down
1 change: 1 addition & 0 deletions docs/resources/virtual_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ resource "spectrocloud_virtual_cluster" "cluster" {

### Read-Only

- `admin_kube_config` (String) Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.
- `cloud_config_id` (String, Deprecated) ID of the cloud config used for the cluster. This cloud config must be of type `azure`.
- `id` (String) The ID of this resource.
- `kubeconfig` (String) Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ require (
github.com/hashicorp/terraform-plugin-docs v0.13.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1
github.com/robfig/cron v1.2.0
github.com/spectrocloud/hapi v1.14.1-0.20230814141242-394093e7fedb
github.com/spectrocloud/palette-sdk-go v0.0.0-20230829045040-bf4cc9aa60e1
github.com/spectrocloud/hapi v1.14.1-0.20230921130725-2afc79a3ea05
github.com/spectrocloud/palette-sdk-go v0.0.0-20230922231546-16c6a64a7c0c
github.com/stretchr/testify v1.8.0
gotest.tools v2.2.0+incompatible
k8s.io/api v0.23.5
Expand Down Expand Up @@ -120,4 +120,4 @@ require (
)

//replace github.com/spectrocloud/hapi => ../hapi
replace github.com/spectrocloud/palette-sdk-go => ../palette-sdk-go
//replace github.com/spectrocloud/palette-sdk-go => ../palette-sdk-go
10 changes: 6 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@ github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNl
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
Expand All @@ -715,10 +716,10 @@ github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spectrocloud/gomi v1.14.1-0.20230412095143-b0595c6c6f08 h1:AnOC0U+ExlKBeT5yF2Pg8PPfVOfxwOUBS/5deOl1Q4Y=
github.com/spectrocloud/gomi v1.14.1-0.20230412095143-b0595c6c6f08/go.mod h1:UnhUDpFEvtYh6m384r3xzj8/+Z6/hMp2O8whEMYVHec=
github.com/spectrocloud/hapi v1.14.1-0.20230814141242-394093e7fedb h1:Y/TDXfEZ6GJbYi4bKxFS0HFvmOL6Xs653BoxuZjuKEQ=
github.com/spectrocloud/hapi v1.14.1-0.20230814141242-394093e7fedb/go.mod h1:O/Bkbw92QPSGPNQPqKt7Qlkn+9BKK/a22KTUlk76KHI=
github.com/spectrocloud/palette-sdk-go v0.0.0-20230829045040-bf4cc9aa60e1 h1:gqnua/jMzX8fx9yt+niCxQ99XkzKiA+HF+LRbFbWYC8=
github.com/spectrocloud/palette-sdk-go v0.0.0-20230829045040-bf4cc9aa60e1/go.mod h1:xrvueWGPSRdonQkTQvJgDSPe5FRbuqpPJj7Ko0/yxrQ=
github.com/spectrocloud/hapi v1.14.1-0.20230921130725-2afc79a3ea05 h1:QHuGuSItjNA0iVda1OCvHlWDjps6NR1X1/pjlYmIOp8=
github.com/spectrocloud/hapi v1.14.1-0.20230921130725-2afc79a3ea05/go.mod h1:aI54jbfaSec1ikHSMOJQ7mMOTaRKpQTRCoMKamhBE9s=
github.com/spectrocloud/palette-sdk-go v0.0.0-20230922231546-16c6a64a7c0c h1:PSGaCVQGsgKymA73yRYBQ1Ick06QYEbH4W7no+k4a+M=
github.com/spectrocloud/palette-sdk-go v0.0.0-20230922231546-16c6a64a7c0c/go.mod h1:Om6X/eH6h787jrynu9NTAeuxFpC15E/Atco5kQwiM90=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
Expand Down Expand Up @@ -784,6 +785,7 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t
github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
github.com/zclconf/go-cty v1.13.1 h1:0a6bRwuiSHtAmqCqNOE+c2oHgepv0ctoxU4FUe43kwc=
github.com/zclconf/go-cty v1.13.1/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0=
github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4=
go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
Expand Down
5 changes: 5 additions & 0 deletions spectrocloud/resource_cluster_aks.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ func resourceClusterAks() *schema.Resource {
Computed: true,
Description: "Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.",
},
"admin_kube_config": {
Type: schema.TypeString,
Computed: true,
Description: "Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.",
},
"cloud_config": {
Type: schema.TypeList,
ForceNew: true,
Expand Down
5 changes: 5 additions & 0 deletions spectrocloud/resource_cluster_azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ func resourceClusterAzure() *schema.Resource {
Computed: true,
Description: "Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.",
},
"admin_kube_config": {
Type: schema.TypeString,
Computed: true,
Description: "Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.",
},
"cloud_config": {
Type: schema.TypeList,
ForceNew: true,
Expand Down
5 changes: 5 additions & 0 deletions spectrocloud/resource_cluster_coxedge.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ func resourceClusterCoxEdge() *schema.Resource {
Computed: true,
Description: "Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.",
},
"admin_kube_config": {
Type: schema.TypeString,
Computed: true,
Description: "Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.",
},
"cloud_config": {
Type: schema.TypeList,
ForceNew: true,
Expand Down
5 changes: 5 additions & 0 deletions spectrocloud/resource_cluster_edge_native.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ func resourceClusterEdgeNative() *schema.Resource {
Computed: true,
Description: "Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.",
},
"admin_kube_config": {
Type: schema.TypeString,
Computed: true,
Description: "Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.",
},
"cloud_config": {
Type: schema.TypeList,
ForceNew: true,
Expand Down
5 changes: 5 additions & 0 deletions spectrocloud/resource_cluster_edge_vsphere.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ func resourceClusterEdgeVsphere() *schema.Resource {
Computed: true,
Description: "Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.",
},
"admin_kube_config": {
Type: schema.TypeString,
Computed: true,
Description: "Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.",
},
"cloud_config": {
Type: schema.TypeList,
ForceNew: true,
Expand Down
5 changes: 5 additions & 0 deletions spectrocloud/resource_cluster_eks.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ func resourceClusterEks() *schema.Resource {
Computed: true,
Description: "Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.",
},
"admin_kube_config": {
Type: schema.TypeString,
Computed: true,
Description: "Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.",
},
"cloud_config": {
Type: schema.TypeList,
ForceNew: true,
Expand Down
5 changes: 5 additions & 0 deletions spectrocloud/resource_cluster_gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ func resourceClusterGcp() *schema.Resource {
Computed: true,
Description: "Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.",
},
"admin_kube_config": {
Type: schema.TypeString,
Computed: true,
Description: "Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.",
},
"cloud_config": {
Type: schema.TypeList,
ForceNew: true,
Expand Down
5 changes: 5 additions & 0 deletions spectrocloud/resource_cluster_libvirt.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ func resourceClusterLibvirt() *schema.Resource {
Computed: true,
Description: "Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.",
},
"admin_kube_config": {
Type: schema.TypeString,
Computed: true,
Description: "Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.",
},
"cloud_config": {
Type: schema.TypeList,
ForceNew: true,
Expand Down
5 changes: 5 additions & 0 deletions spectrocloud/resource_cluster_maas.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ func resourceClusterMaas() *schema.Resource {
Computed: true,
Description: "Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.",
},
"admin_kube_config": {
Type: schema.TypeString,
Computed: true,
Description: "Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.",
},
"cloud_config": {
Type: schema.TypeList,
ForceNew: true,
Expand Down
5 changes: 5 additions & 0 deletions spectrocloud/resource_cluster_openstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ func resourceClusterOpenStack() *schema.Resource {
Computed: true,
Description: "Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.",
},
"admin_kube_config": {
Type: schema.TypeString,
Computed: true,
Description: "Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.",
},
"cloud_config": {
Type: schema.TypeList,
ForceNew: true,
Expand Down
5 changes: 5 additions & 0 deletions spectrocloud/resource_cluster_tke.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ func resourceClusterTke() *schema.Resource {
Computed: true,
Description: "Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.",
},
"admin_kube_config": {
Type: schema.TypeString,
Computed: true,
Description: "Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.",
},
"cloud_config": {
Type: schema.TypeList,
ForceNew: true,
Expand Down
5 changes: 5 additions & 0 deletions spectrocloud/resource_cluster_virtual.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ func resourceClusterVirtual() *schema.Resource {
Computed: true,
Description: "Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.",
},
"admin_kube_config": {
Type: schema.TypeString,
Computed: true,
Description: "Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.",
},
"cloud_config": {
Type: schema.TypeList,
ForceNew: true,
Expand Down
5 changes: 5 additions & 0 deletions spectrocloud/resource_cluster_vsphere.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ func resourceClusterVsphere() *schema.Resource {
Computed: true,
Description: "Kubeconfig for the cluster. This can be used to connect to the cluster using `kubectl`.",
},
"admin_kube_config": {
Type: schema.TypeString,
Computed: true,
Description: "Admin Kube-config for the cluster. This can be used to connect to the cluster using `kubectl`, With admin privilege.",
},
"cloud_config": {
Type: schema.TypeList,
ForceNew: true,
Expand Down
3 changes: 3 additions & 0 deletions spectrocloud/resource_cluster_vsphere_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@ func TestResourceClusterVsphereRead(t *testing.T) {
GetClusterKubeConfigFn: func(uid string) (string, error) {
return "testKubeConfig", nil
},
GetClusterAdminConfigFn: func(uid string) (string, error) {
return "testAdminKubeConfig", nil
},
GetClusterScanConfigFn: func(uid string) (*models.V1ClusterComplianceScan, error) {
clusterCom := &models.V1ClusterComplianceScan{
Metadata: &models.V1ObjectMeta{
Expand Down

0 comments on commit ea15ede

Please sign in to comment.