This message was deleted.
# general
s
This message was deleted.
b
how do you currently do this?
a
I'll check our tooling. It wasn't me who built it. If I recall correctly, i think they were using an imaging tool but I couldn't recall the name
It looks like it maybe part of a hashicorp tool
how are others doing it?
oh, one project of ours is also using userdata. It uses terraform
data cloudinit_config
where it references an external yml file. The yml file has an entry
write_files:
and under it are the path, owner, permissions, encoding and content. I don't know if the yml file content is specific for terraform though
I found something similar but do I just import cloudinit like
import cloudinit
?
Copy code
cloudconfig = cloudinit.get_config(
      base64_encode = False,
      gzip = False,
      parts = [
        cloudinit.GetConfigPartArgs(
          content = "#cloudconfig\npackages:\n- prometheus-node-exporter",
          content_type = "text/cloud-config",
          filename = "init.cfg"
        )
      ]
    )
ah it said 🙂
Copy code
pip3 install pulumi_cloudinit