Interface VariablesSpec
-
public interface VariablesSpecDescribes variables for Terraform and OpenTofu.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default voidfile(java.lang.Object fileName)Deprecated.USefiles(java.lang.Object...)instead.voidfiles(java.lang.Object... fileNames)Adds one or more file names containingterraformvariables.RemoteStateVarProvidergetRemoteStateMap()Provide access to a remote state configuration.voidlist(java.lang.String name, java.lang.Iterable<?> vals)Adds a list as a variable.voidlist(java.lang.String name, java.lang.Object val1, java.lang.Object... vals)Adds a list as a variable.voidmap(java.lang.String name, org.gradle.api.provider.Provider<java.util.Map<java.lang.String,?>> mapProvider)Adds a map provider as a variable.voidmap(java.util.Map<java.lang.String,?> map, java.lang.String name)Adds a map as a variable.voidprovider(org.gradle.api.Action<VariablesSpec> additionalVariables)Adds additional actions which can add variables.voidremoteStateMap(groovy.lang.Closure<?> configurator)Configure the injection of a map forterraform_remote_stateusage.voidremoteStateMap(org.gradle.api.Action<RemoteStateVarProvider> configurator)Configure the injection of a map forterraform_remote_stateusage.voidvar(java.lang.String name, java.lang.Object value)Adds one variable.
-
-
-
Method Detail
-
var
void var(java.lang.String name, java.lang.Object value)Adds one variable.This will replace any previous entry by the same name.
- Parameters:
name- Name of variable.value- Lazy-evaluated form of variable. Anything resolvable viaStringTools.stringize(Object)is accepted.
-
map
void map(java.util.Map<java.lang.String,?> map, java.lang.String name)Adds a map as a variable.This will replace any previous entry by the same name.
- Parameters:
name- Name of variable.map- Lazy-evaluated forms of variable. Anything resolvable viaStringTools.stringizeValues(java.util.Map<java.lang.String, ?>)is accepted.
-
map
void map(java.lang.String name, org.gradle.api.provider.Provider<java.util.Map<java.lang.String,?>> mapProvider)Adds a map provider as a variable.This will replace any previous map by the same name.
- Parameters:
name- Name of mapmapProvider- Provider to map
-
list
void list(java.lang.String name, java.lang.Object val1, java.lang.Object... vals)Adds a list as a variable.This will replace any previous entry by the same name.
- Parameters:
name- Name of variable.val1- Firstvals- Lazy-evaluated forms of variable. Anything resolvable viaStringTools.stringize(java.lang.Object)is accepted.
-
list
void list(java.lang.String name, java.lang.Iterable<?> vals)Adds a list as a variable.This will replace any previous entry by the same name.
- Parameters:
name- Name of variable.vals- Lazy-evaluated forms of variable. Anything resolvable viaStringTools.stringize(java.lang.Object)is accepted.
-
file
@Deprecated default void file(java.lang.Object fileName)
Deprecated.USefiles(java.lang.Object...)instead.Adds a name of a file containingterraformvariables.- Parameters:
fileName- Files that can be converted viaStringTools.stringize(java.lang.Object)and resolved relative to the appropriate source set.
-
files
void files(java.lang.Object... fileNames)
Adds one or more file names containingterraformvariables.- Parameters:
fileNames- Files that can be converted viaStringTools.stringize(java.lang.Object)and resolved relative to the appropriate source set.
-
provider
void provider(org.gradle.api.Action<VariablesSpec> additionalVariables)
Adds additional actions which can add variables. These will be called first when evaluating a final escaped variable map.- Parameters:
additionalVariables- Action that can be called to provide additional variables.
-
remoteStateMap
void remoteStateMap(org.gradle.api.Action<RemoteStateVarProvider> configurator)
Configure the injection of a map forterraform_remote_stateusage.- Parameters:
configurator- Configuration action.
-
remoteStateMap
void remoteStateMap(@DelegatesTo(RemoteStateVarProvider.class) groovy.lang.Closure<?> configurator)
Configure the injection of a map forterraform_remote_stateusage.- Parameters:
configurator- Configuration closure.
-
getRemoteStateMap
RemoteStateVarProvider getRemoteStateMap()
Provide access to a remote state configuration.- Returns:
- Instance implemting
RemoteStateVarProvider.
-
-