Skip to content

Commit

Permalink
Add output variables for kube_admin_config (#87)
Browse files Browse the repository at this point in the history
* Update docker file to use the current terraform-test image

* Remove deprecated  -check-variables from test script

* Add init step to validation test

* update

* update

* update

* update

* updatwe

* update

* update

* r1

* update README

* update

* update

* identity

* update

* update

* update

* update

Co-authored-by: Malte Lantin <malantin@microsoft.com>
Co-authored-by: Ubuntu <weiyuping@ubuntu-wyp.4smfdm3ngeyufpdz0muw5zebpc.bx.internal.cloudapp.net>
Co-authored-by: root <root@ubuntu-wyp.4smfdm3ngeyufpdz0muw5zebpc.bx.internal.cloudapp.net>
  • Loading branch information
4 people authored Jan 20, 2021
1 parent c73aafb commit 7ebc326
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
24 changes: 24 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,27 @@ output "system_assigned_identity" {
output "kubelet_identity" {
value = azurerm_kubernetes_cluster.main.kubelet_identity
}

output "admin_client_key" {
value = length(azurerm_kubernetes_cluster.main.kube_admin_config) > 0 ? azurerm_kubernetes_cluster.main.kube_admin_config.0.client_key : ""
}

output "admin_client_certificate" {
value = length(azurerm_kubernetes_cluster.main.kube_admin_config) > 0 ? azurerm_kubernetes_cluster.main.kube_admin_config.0.client_certificate : ""
}

output "admin_cluster_ca_certificate" {
value = length(azurerm_kubernetes_cluster.main.kube_admin_config) > 0 ? azurerm_kubernetes_cluster.main.kube_admin_config.0.cluster_ca_certificate : ""
}

output "admin_host" {
value = length(azurerm_kubernetes_cluster.main.kube_admin_config) > 0 ? azurerm_kubernetes_cluster.main.kube_admin_config.0.host : ""
}

output "admin_username" {
value = length(azurerm_kubernetes_cluster.main.kube_admin_config) > 0 ? azurerm_kubernetes_cluster.main.kube_admin_config.0.username : ""
}

output "admin_password" {
value = length(azurerm_kubernetes_cluster.main.kube_admin_config) > 0 ? azurerm_kubernetes_cluster.main.kube_admin_config.0.password : ""
}
48 changes: 48 additions & 0 deletions test/fixture/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,51 @@ output "test_aks_without_monitor_id" {
output "test_aks_without_monitor_identity" {
value = module.aks_without_monitor.system_assigned_identity
}

output "test_admin_client_key" {
value = module.aks.admin_client_key
}

output "test_admin_client_certificate" {
value = module.aks.admin_client_certificate
}

output "test_admin_cluster_ca_certificate" {
value = module.aks.admin_client_certificate
}

output "test_admin_host" {
value = module.aks.admin_host
}

output "test_admin_username" {
value = module.aks.admin_username
}

output "test_admin_password" {
value = module.aks.admin_password
}

output "test_client_key" {
value = module.aks.client_key
}

output "test_client_certificate" {
value = module.aks.client_certificate
}

output "test_cluster_ca_certificate" {
value = module.aks.client_certificate
}

output "test_host" {
value = module.aks.host
}

output "test_username" {
value = module.aks.username
}

output "test_password" {
value = module.aks.password
}

0 comments on commit 7ebc326

Please sign in to comment.