terraform/website/docs
Martin Atkins cec4578005 lang/funcs: Experimental "defaults" function
This is a new part of the existing module_variable_optional_attrs
experiment, because it's intended to complement the ability to declare
an input variable whose type constraint is an object type with optional
attributes. Module authors can use this to replace null values (that were
either explicitly set or implied by attribute omission) with other
non-null values of the same type.

This function is a bit more type-fussy than our functions typically are
because it's intended for use primarily with input variables that have
fully-specified type constraints, and thus it uses that type information
to help inform how the defaults data structure should be interpreted.

Other uses of this function will probably be harder today because it takes
a lot of extra annotation to build a value of a specific type if it isn't
passing through a variable type constraint. Perhaps later language
features for more general type conversion will make this more applicable,
but for now the more general form of this problem is better solved other
ways.
2020-11-13 17:27:20 -08:00
..
backends Merge pull request #26723 from hashicorp/oct20_language_and_cli_docs 2020-11-11 19:31:05 -08:00
cli Merge pull request #26723 from hashicorp/oct20_language_and_cli_docs 2020-11-11 19:31:05 -08:00
commands Merge pull request #26723 from hashicorp/oct20_language_and_cli_docs 2020-11-11 19:31:05 -08:00
configuration lang/funcs: Experimental "defaults" function 2020-11-13 17:27:20 -08:00
configuration-0-11 website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
import website: Update all Learn crosslinks (#26442) 2020-10-02 11:02:59 -07:00
internals website: Update module-registry-protocol.html.md (#26639) 2020-10-28 09:09:52 -04:00
modules Fix grammar 2020-11-13 11:28:13 -05:00
plugins website: Make most of /docs/plugins into ghost pages on Extend 2020-10-26 18:21:29 -07:00
providers website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
provisioners communicator/ssh: Add support for Windows targets (#26865) 2020-11-12 10:00:48 -05:00
registry Merge pull request #26723 from hashicorp/oct20_language_and_cli_docs 2020-11-11 19:31:05 -08:00
state Merge pull request #26723 from hashicorp/oct20_language_and_cli_docs 2020-11-11 19:31:05 -08:00
cli-index.html.md website: Add new "glue"/overview pages for CLI and language docs 2020-11-11 19:13:23 -08:00