Skip to content

Commit

Permalink
remove ssh-key requirement and add key_data in output file
Browse files Browse the repository at this point in the history
  • Loading branch information
marycrawford committed Mar 28, 2024
1 parent a86cc71 commit 56d87f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions templates/aks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ resource "azurerm_kubernetes_cluster" "k8s" {
linux_profile {
admin_username = var.username

ssh_key {
key_data = jsondecode(azapi_resource_action.ssh_public_key_gen.output).publicKey
}
}
network_profile {
network_plugin = "kubenet"
Expand Down
4 changes: 4 additions & 0 deletions templates/aks/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@ output "host" {
output "kube_config" {
value = azurerm_kubernetes_cluster.k8s.kube_config_raw
sensitive = true
}

output "key_data" {
value = jsondecode(azapi_resource_action.ssh_public_key_gen.output).publicKey
}

0 comments on commit 56d87f3

Please sign in to comment.