Commit Graph

4 Commits

Author SHA1 Message Date
Quentin Machu f721608e4e provider/template: Add a 'dir' resource to template entire directories
When TerraForm is used to configure and deploy infrastructure
applications that require dozens templated files, such as Kubernetes, it
becomes extremely burdensome to template them individually: each of them
requires a data source block as well as an upload/export (file
provisioner, AWS S3, ...).

Instead, this commit introduces a mean to template an entire folder of
files (recursively), that can then be treated as a whole by any provider
or provisioner that support directory inputs (such as the
file provisioner, the archive provider, ...).

This does not intend to make TerraForm a full-fledged templating system
as the templating grammar and capabilities are left unchanged. This only
aims at improving the user-experience of the existing templating
provider by significantly reducing the overhead when several files are
to be generated - without forcing the users to rely on external tools
when these templates stay simple and that their generation in TerraForm
is justified.
2017-04-25 10:48:26 -07:00
Martin Atkins 861ac536dd provider/template: convert resources to data sources
The template resources don't actually need to retain any state, so they
are good candidates to be data sources.

This includes a few tweaks to the acceptance tests -- now configured to
run as unit tests -- since it seems that they have been slightly broken
for a while now. In particular, the "update" cases are no longer tested
because updating is not a meaningful operation for a data source.
2016-07-08 17:11:17 +01:00
James Nugent a926fa6fdd Adds template_cloudinit_config resource to template
This adds a new resource to template to generate multipart cloudinit
configurations to be used with other providers/resources.

The resource has the ability gzip and base64 encode the parts.
2015-12-21 13:32:26 -05:00
Josh Bleecher Snyder 745d83a995 providers: add template provider
Fixes #215.
2015-05-01 16:59:49 -07:00