Interface SSHProvisionerConnection

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

@Generated(value="jsii-pacmak/1.87.0 (build 9892444)", date="2023-10-13T15:37:51.563Z") @Stability(Experimental) public interface SSHProvisionerConnection extends software.amazon.jsii.JsiiSerializable
(experimental) Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect.

Refer to

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

    • getHost

      @Stability(Experimental) @NotNull String getHost()
      (experimental) The address of the resource to connect to.
    • getType

      @Stability(Experimental) @NotNull String getType()
      (experimental) The connection type.

      Valid values are "ssh" and "winrm". Provisioners typically assume that the remote system runs Microsoft Windows when using WinRM. Behaviors based on the SSH target_platform will force Windows-specific behavior for WinRM, unless otherwise specified.

    • getAgent

      @Stability(Experimental) @Nullable default String getAgent()
      (experimental) Set to false to disable using ssh-agent to authenticate.

      On Windows the only supported SSH authentication agent is Pageant.

    • getAgentIdentity

      @Stability(Experimental) @Nullable default String getAgentIdentity()
      (experimental) The preferred identity from the ssh agent for authentication.
    • getBastionCertificate

      @Stability(Experimental) @Nullable default String getBastionCertificate()
      (experimental) The contents of a signed CA Certificate.

      The certificate argument must be used in conjunction with a bastion_private_key. These can be loaded from a file on disk using the the file function.

    • getBastionHost

      @Stability(Experimental) @Nullable default String getBastionHost()
      (experimental) Setting this enables the bastion Host connection.

      The provisioner will connect to bastion_host first, and then connect from there to host.

    • getBastionHostKey

      @Stability(Experimental) @Nullable default String getBastionHostKey()
      (experimental) The public key from the remote host or the signing CA, used to verify the host connection.
    • getBastionPassword

      @Stability(Experimental) @Nullable default String getBastionPassword()
      (experimental) The password to use for the bastion host.
    • getBastionPort

      @Stability(Experimental) @Nullable default Number getBastionPort()
      (experimental) The port to use connect to the bastion host.
    • getBastionPrivateKey

      @Stability(Experimental) @Nullable default String getBastionPrivateKey()
      (experimental) The contents of an SSH key file to use for the bastion host.

      These can be loaded from a file on disk using the file function.

    • getBastionUser

      @Stability(Experimental) @Nullable default String getBastionUser()
      (experimental) The user for the connection to the bastion host.
    • getCertificate

      @Stability(Experimental) @Nullable default String getCertificate()
      (experimental) The contents of a signed CA Certificate.

      The certificate argument must be used in conjunction with a private_key. These can be loaded from a file on disk using the the file function.

    • getHostKey

      @Stability(Experimental) @Nullable default String getHostKey()
      (experimental) The public key from the remote host or the signing CA, used to verify the connection.
    • getPassword

      @Stability(Experimental) @Nullable default String getPassword()
      (experimental) The password to use for the connection.
    • getPort

      @Stability(Experimental) @Nullable default Number getPort()
      (experimental) The port to connect to.

      Default: 22

    • getPrivateKey

      @Stability(Experimental) @Nullable default String getPrivateKey()
      (experimental) The contents of an SSH key to use for the connection.

      These can be loaded from a file on disk using the file function. This takes preference over password if provided.

    • getProxyHost

      @Stability(Experimental) @Nullable default String getProxyHost()
      (experimental) Setting this enables the SSH over HTTP connection.

      This host will be connected to first, and then the host or bastion_host connection will be made from there.

    • getProxyPort

      @Stability(Experimental) @Nullable default Number getProxyPort()
      (experimental) The port to use connect to the proxy host.
    • getProxyScheme

      @Stability(Experimental) @Nullable default String getProxyScheme()
      (experimental) The ssh connection also supports the following fields to facilitate connections by SSH over HTTP proxy.
    • getProxyUserName

      @Stability(Experimental) @Nullable default String getProxyUserName()
      (experimental) The username to use connect to the private proxy host.

      This argument should be specified only if authentication is required for the HTTP Proxy server.

    • getProxyUserPassword

      @Stability(Experimental) @Nullable default String getProxyUserPassword()
      (experimental) The password to use connect to the private proxy host.

      This argument should be specified only if authentication is required for the HTTP Proxy server.

    • getScriptPath

      @Stability(Experimental) @Nullable default String getScriptPath()
      (experimental) The path used to copy scripts meant for remote execution.

      Refer to

      invalid @link
      {@link https://developer.hashicorp.com/terraform/language/resources/provisioners/connection#how-provisioners-execute-remote-scripts
      How Provisioners Execute Remote Scripts below for more details}
    • getTargetPlatform

      @Stability(Experimental) @Nullable default String getTargetPlatform()
      (experimental) The target platform to connect to.

      Valid values are "windows" and "unix". If the platform is set to windows, the default script_path is c:\windows\temp\terraform_%RAND%.cmd, assuming the SSH default shell is cmd.exe. If the SSH default shell is PowerShell, set script_path to "c:/windows/temp/terraform_%RAND%.ps1"

      Default: unix

    • getTimeout

      @Stability(Experimental) @Nullable default String getTimeout()
      (experimental) The timeout to wait for the connection to become available.

      Should be provided as a string (e.g., "30s" or "5m".)

      Default: 5m

    • getUser

      @Stability(Experimental) @Nullable default String getUser()
      (experimental) The user to use for the connection.

      Default: root

    • builder

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