Equivalent of terraform init
.
Fields inherited from class | Fields |
---|---|
class AbstractTerraformTask |
JSON_FORMAT, NO_COLOR |
Type | Name and description |
---|---|
Provider<java.io.File> |
backendConfigFile |
java.util.Map<java.lang.String, java.lang.String> |
backendConfigValues |
boolean |
forceCopy |
Provider<java.io.File> |
pluginDirectory The directory where terraform plgins data is written to. |
boolean |
reconfigure |
boolean |
skipChildModules Skip initialisation of child modules. |
boolean |
skipConfigureBackends Whether backend configuration should be skipped. |
Provider<java.io.File> |
terraformInitStateFile The location of the file that provides details about the last run of this task. |
Provider<java.io.File> |
terraformStateFile The location of terraform.tfstate . |
boolean |
upgrade Whether modules should be upgraded |
boolean |
verifyPlugins Whether plugins should be verified. |
Constructor and description |
---|
TerraformInit
() |
Type Params | Return Type | Name and description |
---|---|---|
|
protected TerraformExecSpec |
addCommandSpecificsToExecSpec(TerraformExecSpec execSpec) Add specific command-line options for the command. |
|
void |
backendConfigValue(java.lang.String key, java.lang.Object value) Adds a single backend value. |
|
void |
backendConfigValues(java.util.Map<java.lang.String, java.lang.Object> backendValues) Adds additional backend configuration values |
|
void |
exec() |
|
Provider<java.io.File> |
getBackendConfigFile() Configuration for Terraform backend. |
|
java.util.Map<java.lang.String, java.lang.String> |
getBackendConfigValues() Backend configuration files. |
|
void |
setBackendConfigFile(java.lang.Object location) Set location of backend configuration file. |
|
void |
setBackendConfigValues(java.util.Map<java.lang.String, java.lang.Object> backendValues) Replaces any existing backend configuration values with a new set. |
|
void |
setUseBackendFile(Provider<java.lang.Boolean> useBackend) Whether a backend config file should be used. |
The directory where terraform plgins data is written to.
Skip initialisation of child modules.
Whether backend configuration should be skipped.
This option can be set from the command-line with --no-configure-backends
The location of the file that provides details about the last run of this task.
The location of terraform.tfstate
.
Whether modules should be upgraded
This option can be set from the command-line with --upgrade=true
.
Whether plugins should be verified.
Add specific command-line options for the command.
If --refresh-dependencies
was specified on the command-line the -upgrade
will be passed
to terraform init
.
Adds a single backend value.
key
- Name of backend configurationvalue
- Value of backend configuration.Adds additional backend configuration values
backendValues
- Map of key-value pairs.Configuration for Terraform backend. See https
null
if none is required.Backend configuration files. This can be set in addition or as alternative to using a configuration file for the backend.
null
.Set location of backend configuration file.
location
- Anything that can be converted using project.file
.Replaces any existing backend configuration values with a new set. It does not affect anything specified via a configuration file.
backendValues
- Map of replacement key-value pairs.Whether a backend config file should be used.
useBackend
- Provider of a decision.Groovy Documentation