Class LocalExecProvisioner.Builder

java.lang.Object
com.hashicorp.cdktf.LocalExecProvisioner.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<LocalExecProvisioner>
Enclosing interface:
LocalExecProvisioner

@Stability(Experimental) public static final class LocalExecProvisioner.Builder extends Object implements software.amazon.jsii.Builder<LocalExecProvisioner>
A builder for LocalExecProvisioner
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • command

      @Stability(Experimental) public LocalExecProvisioner.Builder command(String command)
      Parameters:
      command - This is the command to execute. This parameter is required. 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.
      Returns:
      this
    • type

      @Stability(Experimental) public LocalExecProvisioner.Builder type(String type)
      Parameters:
      type - the value to be set. This parameter is required.
      Returns:
      this
    • environment

      @Stability(Experimental) public LocalExecProvisioner.Builder environment(Map<String,String> environment)
      Parameters:
      environment - A record of key value pairs representing the environment of the executed command. It inherits the current process environment.
      Returns:
      this
    • interpreter

      @Stability(Experimental) public LocalExecProvisioner.Builder interpreter(List<String> interpreter)
      Parameters:
      interpreter - 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.
      Returns:
      this
    • when

      @Stability(Experimental) public LocalExecProvisioner.Builder when(String when)
      Parameters:
      when - 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
      Returns:
      this
    • workingDir

      @Stability(Experimental) public LocalExecProvisioner.Builder workingDir(String workingDir)
      Parameters:
      workingDir - 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.
      Returns:
      this
    • build

      @Stability(Experimental) public LocalExecProvisioner build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<LocalExecProvisioner>
      Returns:
      a new instance of LocalExecProvisioner
      Throws:
      NullPointerException - if any required attribute was not provided