Skip to content

Commit

Permalink
Merge pull request #4 from adfinis-forks/feature/expose-cluster-crede…
Browse files Browse the repository at this point in the history
…ntials

Expose cluster connection info
  • Loading branch information
strixBE authored Mar 13, 2019
2 parents 057f47c + 548d574 commit 6babc9f
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,19 @@ variable "enable_http_application_routing" {
}
```

The module supports some outputs that may be used to configure a kubernetes
provider after deploying an AKS cluster.

```
provider "kubernetes" {
host = "${module.aks.host}"
client_certificate = "${base64decode(module.aks.client_certificate)}"
client_key = "${base64decode(module.aks.client_key)}"
cluster_ca_certificate = "${base64decode(module.aks.cluster_ca_certificate)}"
}
```

## Authors

Originally created by [Damien Caro](http://github.com/dcaro) and [Malte Lantin](http://github.com/n01d)
Expand Down
10 changes: 9 additions & 1 deletion modules/kubernetes-cluster/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ output "raw_kube_config" {
value = "${azurerm_kubernetes_cluster.main.kube_config_raw}"
}

output "node_resource_group" {
value = "${azurerm_kubernetes_cluster.main.node_resource_group}"
}

output "location" {
value = "${azurerm_kubernetes_cluster.main.location}"
}

output "http_application_routing_zone_name" {
value = "${azurerm_kubernetes_cluster.main.addon_profile.0.http_application_routing.0.http_application_routing_zone_name}"
}
}
31 changes: 31 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
output "client_key" {
value = "${module.kubernetes.client_key}"
}

output "client_certificate" {
value = "${module.kubernetes.client_certificate}"
}

output "cluster_ca_certificate" {
value = "${module.kubernetes.cluster_ca_certificate}"
}

output "host" {
value = "${module.kubernetes.host}"
}

output "username" {
value = "${module.kubernetes.username}"
}

output "password" {
value = "${module.kubernetes.password}"
}

output "node_resource_group" {
value = "${module.kubernetes.node_resource_group}"
}

output "location" {
value = "${module.kubernetes.location}"
}

0 comments on commit 6babc9f

Please sign in to comment.