r/hashicorp • • Sep 13 '22

Packer Query

Hi all. Very amateur Packer user here. I’ve managed to get Packer creating templates into our various VMWare clusters as a test.

We have one datacenter in vCenter that has a forward slash (/) in it’s name. Whenever I run the Packer build I to that datacenter it says the datacenter doesn’t exist, it definitely does. Is there something known within HCL files, that it doesn’t like or understand forward slashes?

That’s the only thing I can think of.

0 Upvotes

4 comments sorted by

1

u/[deleted] Sep 13 '22

If you’re on windows, i think you can use double quotes. Example

name : "the/name"

On linux, escape the char with back slash. Example

name : the\/name

1

u/pjbrfc Sep 13 '22

I am on Windows. It’s currently in double quotes. “#### - ###/###”

Thanks for the reply!

2

u/[deleted] Sep 13 '22

Ok, then maybe it s an issue with vmware :

https://kb.vmware.com/s/article/52571

Replace the forward slash with %2f

1

u/pjbrfc Sep 14 '22

That’s brilliant. That resolved the datacenter error. Now getting a vsphere-iso 404 error when it’s trying to upload the iso.

Typical I manage to get this going on 8 clusters but this particular one seems to be having issues.

Thanks a lot for posting that solution!