This message was deleted.
s
This message was deleted.
b
you can use your language of choices standard base64 encoding and base the string that way, so in typescript:
k => Buffer.from(k).toString("base64")
f
I'm trying to convert this
Copy code
data "template_cloudinit_config" "bastion-config" {
  gzip = true
  base64_encode = true
  part {
    filename = "cloudinit-config.cfg"
    content_type = "text/cloud-config"
    content = data.template_file.cloudinit_config.rendered
  }
  part {
    filename = "bootstrap.sh"
    content_type = "text/x-shellscript"
    content = data.template_file.start_script.rendered
  }
}
so base64 + gzip multi-part file is. then rendered as userData
user_data = data.template_cloudinit_config.bastion-config.rendered