hashicorp / terraform-provider-ignition

Terraform Ignition provider
https://www.terraform.io/docs/providers/ignition/
Mozilla Public License 2.0
38 stars 64 forks source link

Feature request - gzip file resources #26

Closed george-angel closed 6 years ago

george-angel commented 6 years ago

Currently files are being base64 encoded and labelled with the following header: data:text/plain;charset=utf-8;base64,<value>

base64 encoding plaintext results in a larger byte count (important for AWS userdata)

for example our fairly standard kubernetes apiserver manifest has the following byte count:

plain - 2378 b64 - 3180 gzip+b64 - 1208

considering AWS allows up to 16KB pre base64'd data, gziping files would make a huge difference. A single file resource can save 2k!

the only "gotcha" I haven't looked into is whether ignition can parse base64gzip'd files.

Happy to work on a PR if the idea is sound.

george-angel commented 6 years ago

I read up a bit more about it, and ultimately this is constrained by the data uri spec. Closing for now.