From d71d11214f2d9dcd99787e5f3fbb8173db923a22 Mon Sep 17 00:00:00 2001 From: yieter Date: Wed, 8 May 2024 17:33:09 -0400 Subject: [PATCH] Updates to SSH key references. --- Templates/Azure/Terraform/main.tf | 2 +- Templates/Azure/Terraform/ssh.tf | 2 +- documentation/AzureTerraform.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Templates/Azure/Terraform/main.tf b/Templates/Azure/Terraform/main.tf index c9f9bfe..f35e450 100644 --- a/Templates/Azure/Terraform/main.tf +++ b/Templates/Azure/Terraform/main.tf @@ -115,7 +115,7 @@ resource "azurerm_linux_virtual_machine" "my_terraform_vm" { admin_ssh_key { username = var.username - public_key = jsondecode(azapi_resource_action.ssh_public_key_gen.output).publicKey + public_key = azapi_resource_action.ssh_public_key_gen.output.publicKey } boot_diagnostics { diff --git a/Templates/Azure/Terraform/ssh.tf b/Templates/Azure/Terraform/ssh.tf index 378d08d..cd475dc 100644 --- a/Templates/Azure/Terraform/ssh.tf +++ b/Templates/Azure/Terraform/ssh.tf @@ -20,5 +20,5 @@ resource "azapi_resource" "ssh_public_key" { } output "key_data" { - value = jsondecode(azapi_resource_action.ssh_public_key_gen.output).publicKey + value = azapi_resource_action.ssh_public_key_gen.output.publicKey } diff --git a/documentation/AzureTerraform.md b/documentation/AzureTerraform.md index 19678d7..0c58380 100644 --- a/documentation/AzureTerraform.md +++ b/documentation/AzureTerraform.md @@ -188,7 +188,7 @@ resource "azurerm_linux_virtual_machine" "my_terraform_vm" { admin_ssh_key { username = var.username - public_key = jsondecode(azapi_resource_action.ssh_public_key_gen.output).publicKey + public_key = azapi_resource_action.ssh_public_key_gen.output.publicKey } boot_diagnostics { @@ -258,7 +258,7 @@ resource "azapi_resource" "ssh_public_key" { } output "key_data" { - value = jsondecode(azapi_resource_action.ssh_public_key_gen.output).publicKey + value = azapi_resource_action.ssh_public_key_gen.output.publicKey } ```