File tree Expand file tree Collapse file tree 5 files changed +45
-0
lines changed
Expand file tree Collapse file tree 5 files changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -333,5 +333,11 @@ variable "tags" {
333333
334334| Name | Description |
335335| ------| -------------|
336+ | <a name =" output_k8s_cluster_ca_certificate " ></a > [ k8s\_ cluster\_ ca\_ certificate] ( #output\_ k8s\_ cluster\_ ca\_ certificate ) | n/a |
337+ | <a name =" output_k8s_cluster_client_certificate " ></a > [ k8s\_ cluster\_ client\_ certificate] ( #output\_ k8s\_ cluster\_ client\_ certificate ) | n/a |
338+ | <a name =" output_k8s_cluster_client_key " ></a > [ k8s\_ cluster\_ client\_ key] ( #output\_ k8s\_ cluster\_ client\_ key ) | n/a |
339+ | <a name =" output_k8s_cluster_host " ></a > [ k8s\_ cluster\_ host] ( #output\_ k8s\_ cluster\_ host ) | n/a |
340+ | <a name =" output_k8s_cluster_kubeconfig " ></a > [ k8s\_ cluster\_ kubeconfig] ( #output\_ k8s\_ cluster\_ kubeconfig ) | n/a |
336341| <a name =" output_k8s_cluster_moid " ></a > [ k8s\_ cluster\_ moid] ( #output\_ k8s\_ cluster\_ moid ) | n/a |
342+ | <a name =" output_k8s_cluster_profile_moid " ></a > [ k8s\_ cluster\_ profile\_ moid] ( #output\_ k8s\_ cluster\_ profile\_ moid ) | n/a |
337343<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ No modules.
4141| Name | Type |
4242| ------| ------|
4343| [ intersight_kubernetes_cluster_profile.this] ( https://registry.terraform.io/providers/CiscoDevNet/intersight/latest/docs/resources/kubernetes_cluster_profile ) | resource |
44+ | [ intersight_kubernetes_cluster.this] ( https://registry.terraform.io/providers/CiscoDevNet/intersight/latest/docs/data-sources/kubernetes_cluster ) | data source |
4445| [ intersight_organization_organization.this] ( https://registry.terraform.io/providers/CiscoDevNet/intersight/latest/docs/data-sources/organization_organization ) | data source |
4546
4647## Inputs
@@ -66,6 +67,7 @@ No modules.
6667
6768| Name | Description |
6869| ------| -------------|
70+ | <a name =" output_k8s_cluster_kubeconfig " ></a > [ k8s\_ cluster\_ kubeconfig] ( #output\_ k8s\_ cluster\_ kubeconfig ) | n/a |
6971| <a name =" output_k8s_cluster_moid " ></a > [ k8s\_ cluster\_ moid] ( #output\_ k8s\_ cluster\_ moid ) | n/a |
7072| <a name =" output_k8s_cluster_profile_moid " ></a > [ k8s\_ cluster\_ profile\_ moid] ( #output\_ k8s\_ cluster\_ profile\_ moid ) | n/a |
7173<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
Original file line number Diff line number Diff line change @@ -50,3 +50,7 @@ resource "intersight_kubernetes_cluster_profile" "this" {
5050 moid = data. intersight_organization_organization . this . results . 0 . moid
5151 }
5252}
53+
54+ data "intersight_kubernetes_cluster" "this" {
55+ moid = intersight_kubernetes_cluster_profile. this . associated_cluster . 0 . moid
56+ }
Original file line number Diff line number Diff line change 11output "k8s_cluster_profile_moid" {
22 value = intersight_kubernetes_cluster_profile. this . moid
33}
4+
45output "k8s_cluster_moid" {
56 value = intersight_kubernetes_cluster_profile. this . associated_cluster . 0 . moid
7+ }
8+
9+ output "k8s_cluster_kubeconfig" {
10+ value = data. intersight_kubernetes_cluster . this . results . 0 . kube_config
611}
Original file line number Diff line number Diff line change 11output "k8s_cluster_moid" {
22 value = module. cluster_profile . k8s_cluster_moid
3+ }
4+
5+ output "k8s_cluster_profile_moid" {
6+ value = module. cluster_profile . k8s_cluster_profile_moid
7+ }
8+
9+ output "k8s_cluster_kubeconfig" {
10+ value = module. cluster_profile . k8s_cluster_kubeconfig
11+ sensitive = true
12+ }
13+
14+ output "k8s_cluster_host" {
15+ value = try (yamldecode (base64decode (module. cluster_profile . k8s_cluster_kubeconfig )). clusters [0 ]. cluster . server , " " )
16+ }
17+
18+ output "k8s_cluster_ca_certificate" {
19+ value = try (base64decode (yamldecode (base64decode (module. cluster_profile . k8s_cluster_kubeconfig )). clusters [0 ]. cluster . certificate-authority-data ), " " )
20+ sensitive = true
21+ }
22+
23+ output "k8s_cluster_client_certificate" {
24+ value = try (base64decode (yamldecode (base64decode (module. cluster_profile . k8s_cluster_kubeconfig )). users [0 ]. user . client-certificate-data ), " " )
25+ sensitive = true
26+ }
27+
28+ output "k8s_cluster_client_key" {
29+ value = try (base64decode (yamldecode (base64decode (module. cluster_profile . k8s_cluster_kubeconfig )). users [0 ]. user . client-key-data ), " " )
30+ sensitive = true
331}
You can’t perform that action at this time.
0 commit comments