terraform/website/docs
Martin Atkins 954d38e870 lang: New file-hashing functions
In prior versions, we recommended using hash functions in conjunction with
the file function as an idiom for detecting changes to upstream blobs
without fetching and comparing the whole blob.

That approach relied on us being able to return raw binary data from
file(...). Since Terraform strings pass through intermediate
representations that are not binary-safe (e.g. the JSON state), there was
a risk of string corruption in prior versions which we have avoided for
0.12 by requiring that file(...) be used only with UTF-8 text files.

The specific case of returning a string and immediately passing it into
another function was not actually subject to that corruption risk, since
the HIL interpreter would just pass the string through verbatim, but this
is still now forbidden as a result of the stricter handling of file(...).

To avoid breaking these use-cases, here we introduce variants of the hash
functions a with "file" prefix that take a filename for a disk file to
hash rather than hashing the given string directly. The configuration
upgrade tool also now includes a rule to detect the documented idiom and
rewrite it into a single function call for one of these new functions.

This does cause a bit of function sprawl, but that seems preferable to
introducing more complex rules for when file(...) can and cannot read
binary files, making the behavior of these various functions easier to
understand in isolation.
2019-01-25 10:18:44 -08:00
..
backends backend/azurerm: fixing the syntax highlighting (#20085) 2019-01-23 13:33:11 +00:00
commands command/json*: updating documentation and adding tests (#19944) 2019-01-09 08:59:11 -08:00
configuration lang: New file-hashing functions 2019-01-25 10:18:44 -08:00
import docs/import: Remove out of date listing of importable resources and note where to find the information 2018-02-14 12:02:45 -05:00
internals website: Add docs/internals/archiving.html to describe the archiving process. (#18831) 2018-09-10 17:32:43 -07:00
modules Remove support for the -module-depth flag 2018-11-02 18:44:04 +01:00
plugins website: Finish moving "writing custom providers" to /docs/extend/ 2019-01-11 16:36:40 -08:00
providers Merge branch 'master' into cgriggs01-comm-5 2019-01-09 14:31:47 -08:00
provisioners website: Fix references to the now-defunct "Interpolation" page 2018-10-16 18:48:28 -07:00
registry website: fix curl example for registry API 2018-07-25 09:11:54 -07:00
state website: Fix redundant "be" in workspaces documentation 2018-11-28 07:59:37 -08:00
index.html.markdown provider/terraform: reorganize for merge into core 2017-11-02 10:46:31 -07:00