https://pulumi.com logo
#general
Title
# general
a

aloof-spoon-46068

03/20/2019, 5:38 PM
Hi, I’m trying to use the
customData
field for an Azure VM, but I’m unsure as to how to provide the data. I tried just using a filename of a cloud-init file I have in the local directory (i.e.
customData: "cloud-init.txt"
, but after I boot the VM it shows the field with
customData: ""
Do I have to specify it a different way?
w

white-balloon-205

03/20/2019, 6:14 PM
You pass the raw text of the
customData
- which you could read out of the file on disk with
fs.readFileSync('cloud-init.txt')
for example. You can see an example of this here: https://github.com/pulumi/examples/blob/master/azure-js-webserver/index.js#L50
a

aloof-spoon-46068

03/20/2019, 7:58 PM
got it, thanks!
3 Views