Command-line options for tasks

Task Option Type Default Purpose

tfApply

--targets

list

 

Select group of resources to apply.

--replace

boolean

false

Select group of resources to replace.

tfCleanupWorkspaces

--force

boolean

false

Force removal of dangling workspaces even if state still exists.

tfDestroy

--targets

list

 

Select group of resources to apply.

--approve

boolean

false

Auto-approve destruction of all mentioned resources.

tfDestroyPlan

--targets

list

 

Select group of resources to apply.

--json

boolean

false

Write textual plan in JSON format.

tfImport

--path

string

 

Resource to import e.g. aws_ecs_cluster.my_cluster

--id

string

 

Actual identifier to import. Check the Terraform documentation for the specific resource in order to know how to identify this.

tfInit

--upgrade

boolean

 

Force upgrade of modules

--no-configure-backends

boolean

 

Do not configure backends

--force-copy

boolean

 

Automatically answer yes to any backend migration questions

--reconfigure

boolean

 

Disregard any existing configuration and prevent migration of any existing state

tfOutput

--json

boolean

false

Write validation output in JSON format.

tfPlan

--targets

list

 

Select group of resources to apply.

--json

boolean

false

Write textual plan in JSON format.

--replace

boolean

false

Select group of resources to replace.

tfShowState

--json

boolean

false

Write validation output in JSON format.

tfStateMv

--from-path

string

 

Source item to move i.e. packet_device.worker or module.app.

--to-path

string

 

Destination item i.e. packet_device.helper or module.parent.module.app.

tfStatePush

--state-file

string

 

Local state file path (relative to Terraform source directory) to push to remote state.

tfStateRm

--path

string

 

Resource to remove e.g. aws_ecs_cluster.my_cluster

tfTaint

--path

string

 

Resource to taint.

--allow-missing

boolean

false

Allow task to succeed even if the resource is missing.

--ignore-remote-version

boolean

false

Continue if remote and local Terraform versions differ from Terraform Cloud.

tfUntaint

--path

string

 

Resource to untaint.

--allow-missing

boolean

false

Allow task to succeed even if the resource is missing.

--ignore-remote-version

boolean

false

Continue if remote and local Terraform versions differ from Terraform Cloud.

tfValidate

--json

boolean

false

Write validation output in JSON format.

In the case that the plugin does not support a specific command-line parameter, it is possible to temporarily inject it using the --patch-arg and --patch-args parameters. Both of them can be repeated multiple times. The first one takes a single parameters, whereas the second one is intended to take a command-line snippet of parameters. If a parameter contains a space, you must use `patch-arg to pass it.

Just in case this documentation is out-of-date, always run ./gradlew help --task <taskName> to get a description of supported command-line options.