String Formatting
The AutoCloud Terraform provider resources make use of string data extensively. These strings may support several key features in their usage. Specifically, these strings may contain markdown, internal value references, and dynamic value interpolation.
Some strings are intended to contain long form text to be used in descriptive areas. These arguments are notated in the sections that follow. These long form text elements support GitHub Flavored Markdown. This markdown format should be familiar to most developers. See the Github reference guide for details.
These markdown strings may be defined inline using Terraform's heredoc string support, or loaded from disk using the file function.
Example using heredoc:
Example using file:
Some strings support dynamic value interpolation to complete them using values known at code generation time, but not necessarily at blueprint definition time. To support this, strings may be defined with placeholder elements, and values may be passed for those placeholders.
A placeholder is defined by wrapping the placeholder name with two curly braces, for example {{name}}. This placeholder value will be replaced with the value passed in the accompanying variables argument.
The variables argument is used to specify placeholder keys and their accompanying values. Combined with the internal references support described below, dynamic values may be generated when the consumer uses the blueprint.
Example:
In several use cases, it is desirable to reference values that are not known when the blueprint is defined, but when the consumer uses the blueprint and inputs the values required.
Values may be referenced using the module name and variable name using dot notation. For example, if a module is integrated and given the name cluster, and the module has a variable region, the value may be referenced as cluster.region.
Example:
