commit 40fb07e60d8f886d019a4c7396518e484ad676cc
parent b79dd40b1fce7f3c5ab75fbf1720df1b5bbd3b78
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date: Tue, 17 May 2022 14:17:57 +0200
replace local_file w/ local_sensitive_file
Diffstat:
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/libvirt/terraform/outputs.tf b/libvirt/terraform/outputs.tf
@@ -12,7 +12,7 @@ output "ssh_private_key" {
}
output "ssh_private_keyfile" {
- value = local_file.ssh_private_key.filename
+ value = local_sensitive_file.ssh_private_key.filename
}
output "ssh_public_key" {
@@ -21,5 +21,5 @@ output "ssh_public_key" {
}
output "ssh_public_keyfile" {
- value = local_file.ssh_public_key.filename
+ value = local_sensitive_file.ssh_public_key.filename
}
diff --git a/libvirt/terraform/vms.tf b/libvirt/terraform/vms.tf
@@ -53,13 +53,13 @@ resource "libvirt_volume" "volume" {
resource "tls_private_key" "id_rsa" {
algorithm = "RSA"
}
-resource "local_file" "ssh_private_key" {
- sensitive_content = tls_private_key.id_rsa.private_key_pem
+resource "local_sensitive_file" "ssh_private_key" {
+ content = tls_private_key.id_rsa.private_key_pem
filename = "${path.module}/../ssh/id_rsa"
file_permission = "0600"
}
-resource "local_file" "ssh_public_key" {
- sensitive_content = tls_private_key.id_rsa.public_key_openssh
+resource "local_sensitive_file" "ssh_public_key" {
+ content = tls_private_key.id_rsa.public_key_openssh
filename = "${path.module}/../ssh/id_rsa.pub"
}
@@ -208,7 +208,7 @@ resource "libvirt_network" "network" {
resource "null_resource" "update_cloudinit" {
triggers = {
# when the ssh key in the local cloudinit file changes
- key_id = local_file.ssh_public_key.id
+ key_id = local_sensitive_file.ssh_public_key.id
}
provisioner "local-exec" {
# recreate cloudinit config