Base class for Terraform tasks.
Type | Name and description |
---|---|
java.util.Map<java.lang.String, ?> |
environment |
Constructor and description |
---|
protected AbstractTerraformBaseTask
(java.lang.String cmd, java.util.List<java.lang.Class> configExtensions, java.util.List<TerraformExtensionConfigTypes> terraformConfigExtensions) |
Type Params | Return Type | Name and description |
---|---|---|
|
protected void |
addCommandLineProvider(Provider<java.util.List<java.lang.String>> provider) Adds a command-line provider. |
|
protected TerraformExecSpec |
addCommandSpecificsToExecSpec(TerraformExecSpec execSpec) Add specific command-line options for the command. /** Add specific command-line options for the command. |
|
protected TerraformExecSpec |
buildExecSpec() |
|
protected void |
captureStdOutTo(Provider<java.io.File> output) When command is run, capture the standard output |
|
protected TerraformExecSpec |
configureExecSpec(TerraformExecSpec execSpec) Configures a TerraformExecSpec. |
|
protected TerraformExecSpec |
configureExecSpecForCmd(TerraformExecSpec execSpec, java.lang.String tfcmd, java.util.List<java.lang.String> cmdParams) Configures execution specification for a specific command. |
|
protected TerraformExecSpec |
createExecSpec() Creates a TerraformExecSpec. |
|
void |
exec() |
|
protected java.util.List<Provider<java.util.List<java.lang.String>>> |
getCommandLineProviders() |
|
protected java.util.List<java.lang.String> |
getDefaultCommandParameters() |
|
static java.util.Map<java.lang.String, java.lang.Object> |
getDefaultEnvironment() |
|
java.util.Map<java.lang.String, java.lang.String> |
getEnvironment() Environment for running the exe |
|
protected ProjectOperations |
getProjectOperations() Project operations that replaces legacy methods on the org.gradle.api.Project class and which are safe to use in configuration cache environments. |
|
protected TerraformExtension |
getProjectTerraform() |
|
protected Provider<java.io.File> |
getStdoutCapture() |
|
protected java.lang.String |
getTerraformCommand() Returns the terraform command this task is implementing. |
|
protected java.util.Map<java.lang.String, java.lang.String> |
getTerraformEnvironment() |
|
protected TerraformExtension |
getTerraformExtension() |
|
protected TerraformRCExtension |
getTerraformrc() |
|
protected TerraformExtension |
getToolExtension() |
|
protected Provider<java.io.File> |
getWorkingDirForCommand() |
|
void |
setEnvironment(java.util.Map<java.lang.String, ?> args) Replace current environment with new one. |
Adds a command-line provider.
Add specific command-line options for the command. /** Add specific command-line options for the command.
When command is run, capture the standard output
output
- Output fileConfigures a TerraformExecSpec.
execSpec
- Specification to be configuredConfigures execution specification for a specific command.
execSpec
- Specification to configure.tfcmd
- Terraform command.cmdParams
- Default command parameters.Creates a TerraformExecSpec.
null
.Environment for running the exe
Calling this will resolve all lazy-values in the variable map.
Project operations that replaces legacy methods on the org.gradle.api.Project class and which are safe to use in configuration cache environments.
Returns the terraform
command this task is implementing.
Replace current environment with new one. Calling this will also remove any project extension environment from this task.
args
- New environment key-value map of properties.Groovy Documentation