@groovy.transform.CompileStatic class Variables extends java.lang.Object
A configuration building block for tasks that need to pass variables to
a terraform task
.
Constructor and description |
---|
Variables
(org.gradle.api.provider.Provider<java.io.File> rootFileResolver) Attach this configuration block to a Terraform extension or source directory set |
Variables
(VarsFilesPair vfp, org.gradle.api.provider.Provider<java.io.File> rootFileResolver) Constructs instance from defintiion of files and variables |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
clear() Removes all existing variables and file references. |
|
void |
file(java.lang.Object fileName) Adds a name of a file containing terraform variables. |
|
VarsFilesPair |
getAllVars() Returns a description of the files and variables |
|
java.util.List<java.lang.String> |
getCommandLineArgs() |
|
java.util.Map<java.lang.String, java.lang.String> |
getEscapedVars() Evaluate all variables and convert them to Terraform-compliant strings, ready to be passed to command-line. |
|
java.util.Set<java.lang.String> |
getFileNames() List of file names containing Terraform variables. |
|
java.util.List<groovy.lang.Closure> |
getInputProperties() |
|
void |
list(java.lang.String name, java.lang.Object val1, java.lang.Object... vals) Adds a list as a variable. |
|
void |
list(java.lang.String name, java.lang.Iterable<?> vals) Adds a list as a variable. |
|
void |
map(java.util.Map<java.lang.String, ?> map, java.lang.String name) Adds a map as a variable. |
|
java.lang.String |
toString() |
|
void |
var(java.lang.String name, java.lang.Object value) Adds one variable. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Attach this configuration block to a Terraform extension or source directory set
rootFileResolver
- Root file resolver for file that are referenced.Constructs instance from defintiion of files and variables
vfp
- Definition of files and variablesrootFileResolver
- Root file resolver for file that are referenced.Removes all existing variables and file references.
Adds a name of a file containing terraform
variables.
fileName
- Files that can be converted via
org.ysb33r.grolifant.api.StringUtils#stringize(Object o) and resolved relative to the appropriate
TerraformSourceDirectorySet.Returns a description of the files and variables
Evaluate all variables and convert them to Terraform-compliant strings, ready to be passed to command-line.
Calling this will resolve all lazy-evaluated entries.
List of file names containing Terraform variables. Filenames can contain relative paths.
Adds a list as a variable.
This will replace any previous entry by the same name.
name
- Name of variable.val1
- Firstvals
- Lazy-evaluated forms of variable. Anything resolvable via
org.ysb33r.grolifant.api.StringUtils#stringize<?> is accepted.Adds a list as a variable.
This will replace any previous entry by the same name.
name
- Name of variable.vals
- Lazy-evaluated forms of variable. Anything resolvable via
org.ysb33r.grolifant.api.StringUtils#stringize<?> is accepted.Adds a map as a variable.
This will replace any previous entry by the same name.
name
- Name of variable.val1
- Firstvals
- Lazy-evaluated forms of variable.
Anything resolvable via org.ysb33r.grolifant.api.MapUtils#stringizeValues(Map)
is accepted.Adds one variable.
This will replace any previous entry by the same name.
name
- Name of variable.value
- Lazy-evaluated form of variable. Anything resolvable via
org.ysb33r.grolifant.api.StringUtils#stringize(Object)
is accepted.Groovy Documentation