#cloud-init
should be the very first line in a multipart configuration
#257
Labels
enhancement
New feature or request
Terraform CLI and Provider Versions
Terraform v1.4.4
on darwin_arm64
Use Cases or Problem Statement
When using a multipart
cloudinit_config
such asit ends up generating a
/var/lib/cloud/instance/user-data.txt
file that starts withThis causes
cloud-init schema --system --annotate
to complain:The other issue is that
merge_type = "list(append)+dict(recurse_array)+str()"
doesn't seem to do anything for the parts besides the first.I had to stick
merge_type = "list(append)+dict(recurse_array)+str()"
in my part YAML files for cloudinit to not overwrite previous parts.Proposal
Would it be possible to move the
#cloud-init
above the--MIMEBOUNDARY
, or add an additional one there?I'm not sure what the feasible solutions might be.
How much impact is this issue causing?
Medium
Additional Information
This was discovered (both problems of the
#cloud-init
comment, and themerge_type = "list(append)+dict(recurse_array)+str()"
not being inserted into each part) when troubleshooting upgrading from Amazon Linux 2 to Amazon Linux 2023 (cloud-init v19 to v22) herecanonical/cloud-init#5533
You'll see that the resolution for that issue was that I needed to manually put
merge_type = "list(append)+dict(recurse_array)+str()"
into each of myuser_data/parts/<part>.yaml
, even though I had it in my Terraform block parts:Code of Conduct
The text was updated successfully, but these errors were encountered: