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

RFE: Allow ignition_file to append to a file #39

Open nhi-vanye opened 6 years ago

nhi-vanye commented 6 years ago

It would be nice to allow appending content to files rather than over-writing the existing content

The use case is to add environment variables to /etc/profile.env to set the HTTP_PROXY variable so the newly deployed OS can access the internet.

IvanovOleg commented 5 years ago

Ignition works only during the first VM startup. That's why even you change the content of the file and suppress the recreation of the VM (due to the custom data change) you will never get an expected result.

captn3m0 commented 5 years ago

The current ignition version (since 2.2.0) supports appending to files:

append (boolean): whether to append to the specified file. Creates a new file if nothing exists at the path. Cannot be set if overwrite is set to true.

Spec: https://coreos.com/ignition/docs/latest/configuration-v2_3.html