Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples: Add usage of base64encode #131

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

mjtrangoni
Copy link
Contributor

What this PR does / why we need it:
Showcase the usage of base64encode for the user_data field.
I was looking at using it like on Terraform-side and it works without any issue.

How Has This Been Tested?:
I've run this setup on my Nutanix cluster, and it worked as expected.

Special notes for your reviewer:

  • No code change, just extend the current examples. Also the user_data content is exactly the same.
  • Removed some non-needed spaces on example/source.nutanix.pkr.hcl.
  • Added the default disabled variable, image_export as false, so that someone else get to know it quicker. IMHO, this is the purpose of the examples.
  • CLA already sent.

Release note:
NONE

example/source.nutanix.pkr.hcl Outdated Show resolved Hide resolved
@tuxtof tuxtof self-requested a review July 17, 2023 12:08
@tuxtof tuxtof merged commit 8098381 into nutanix-cloud-native:main Jul 17, 2023
@tuxtof
Copy link
Contributor

tuxtof commented Jul 17, 2023

thanks for your contribution Mario @mjtrangoni

@tuxtof
Copy link
Contributor

tuxtof commented Aug 2, 2023

HI @mjtrangoni FYI #134

@mjtrangoni
Copy link
Contributor Author

Interesting. I had no issues with this. Is it something related to one OS?

@tuxtof
Copy link
Contributor

tuxtof commented Aug 2, 2023

no your example can't work this is pretty strange

a base64encode("scripts/cloud-init/cloud-config-centos.yaml") just return c2NyaXB0cy9jbG91ZC1pbml0L2Nsb3VkLWNvbmZpZy1jZW50b3MueWFtbA==

who is the base64 version of the file path and you get the file path in the user_data file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants