From 46333c62adcc372890d17cf76d8c4cb6f461d5e3 Mon Sep 17 00:00:00 2001 From: Christophe Jauffret Date: Wed, 2 Aug 2023 09:16:43 +0200 Subject: [PATCH] fix base64encode example --- docs/builders/nutanix.mdx | 2 +- example/source.nutanix.pkr.hcl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/builders/nutanix.mdx b/docs/builders/nutanix.mdx index 05dd405..8fd9cdb 100644 --- a/docs/builders/nutanix.mdx +++ b/docs/builders/nutanix.mdx @@ -49,7 +49,7 @@ These parameters allow to configure everything around image creation, from the t - `communicator` (string) - Protocol used for Packer connection (ex "winrm" or "ssh"). Default is : "ssh". ### Dedicated to Linux -- `user_data` (string) - cloud-init content base64 coded. +- `user_data` (string) - cloud-init content base64 encoded. - `ssh_username` (string) - user for ssh connection initiated by Packer. - `ssh_password` (string) - password for the ssh user. diff --git a/example/source.nutanix.pkr.hcl b/example/source.nutanix.pkr.hcl index eaf27eb..7db7fb8 100644 --- a/example/source.nutanix.pkr.hcl +++ b/example/source.nutanix.pkr.hcl @@ -30,7 +30,7 @@ source "nutanix" "centos" { image_name = "centos-packer-image" image_export = false force_deregister = true - user_data = base64encode("scripts/cloud-init/cloud-config-centos.yaml") + user_data = base64encode(file("scripts/cloud-init/cloud-config-centos.yaml")) shutdown_command = "echo 'packer' | sudo -S shutdown -P now" shutdown_timeout = "2m" @@ -59,7 +59,7 @@ source "nutanix" "ubuntu" { image_name = "ubuntu-packer-image" force_deregister = true - user_data = base64encode("scripts/cloud-init/cloud-config-ubuntu.yaml") + user_data = base64encode(file("scripts/cloud-init/cloud-config-ubuntu.yaml")) shutdown_command = "echo 'packer' | sudo -S shutdown -P now" shutdown_timeout = "2m"