Interface LocalExecProvisioner

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
LocalExecProvisioner.Jsii$Proxy

@Generated(value="jsii-pacmak/1.95.0 (build f1ff514)", date="2024-04-15T08:11:31.995Z") @Stability(Experimental) public interface LocalExecProvisioner extends software.amazon.jsii.JsiiSerializable
(experimental) The local-exec provisioner invokes a local executable after a resource is created.

This invokes a process on the machine running Terraform, not on the resource. See

invalid @link
{@link https://developer.hashicorp.com/terraform/language/resources/provisioners/local-exec
local-exec}
  • Method Details

    • getCommand

      @Stability(Experimental) @NotNull String getCommand()
      (experimental) This is the command to execute.

      It can be provided as a relative path to the current working directory or as an absolute path. It is evaluated in a shell, and can use environment variables or Terraform variables.

    • getType

      @Stability(Experimental) @NotNull String getType()
    • getEnvironment

      @Stability(Experimental) @Nullable default Map<String,String> getEnvironment()
      (experimental) A record of key value pairs representing the environment of the executed command.

      It inherits the current process environment.

    • getInterpreter

      @Stability(Experimental) @Nullable default List<String> getInterpreter()
      (experimental) If provided, this is a list of interpreter arguments used to execute the command.

      The first argument is the interpreter itself. It can be provided as a relative path to the current working directory or as an absolute path The remaining arguments are appended prior to the command. This allows building command lines of the form "/bin/bash", "-c", "echo foo". If interpreter is unspecified, sensible defaults will be chosen based on the system OS.

    • getWhen

      @Stability(Experimental) @Nullable default String getWhen()
      (experimental) If provided, specifies when Terraform will execute the command.

      For example, when = destroy specifies that the provisioner will run when the associated resource is destroyed

    • getWorkingDir

      @Stability(Experimental) @Nullable default String getWorkingDir()
      (experimental) If provided, specifies the working directory where command will be executed.

      It can be provided as a relative path to the current working directory or as an absolute path. The directory must exist.

    • builder

      @Stability(Experimental) static LocalExecProvisioner.Builder builder()
      Returns:
      a LocalExecProvisioner.Builder of LocalExecProvisioner