Skip to main content
The remote-exec provisioner invokes a script on a remote resource after it is created. This can be used to run a configuration management tool, bootstrap into a cluster, etc The remote-exec provisioner requires a connection and supports both ssh and winrm. See remote-exec

Initializer

import io.cdktn.cdktn.RemoteExecProvisioner;

RemoteExecProvisioner.builder()
    .type(java.lang.String)
//  .connection(SSHProvisionerConnection|WinrmProvisionerConnection)
//  .inline(java.util.List<java.lang.String>)
//  .script(java.lang.String)
//  .scripts(java.util.List<java.lang.String>)
    .build();

Properties

NameTypeDescription
typejava.lang.StringNo description.
connectionSSHProvisionerConnection|WinrmProvisionerConnectionMost provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect.
inlinejava.util.List< java.lang.String >This is a list of command strings.
scriptjava.lang.StringThis is a path (relative or absolute) to a local script that will be copied to the remote resource and then executed.
scriptsjava.util.List< java.lang.String >This is a list of paths (relative or absolute) to local scripts that will be copied to the remote resource and then executed.

typeRequired

public java.lang.String getType();
  • Type: java.lang.String

connectionOptional

public SSHProvisionerConnection|WinrmProvisionerConnection getConnection();
Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect. A connection must be provided here or in the parent resource.

inlineOptional

public java.util.List<java.lang.String> getInline();
  • Type: java.util.List< java.lang.String >
This is a list of command strings. They are executed in the order they are provided. This cannot be provided with script or scripts.

scriptOptional

public java.lang.String getScript();
  • Type: java.lang.String
This is a path (relative or absolute) to a local script that will be copied to the remote resource and then executed. This cannot be provided with inline or scripts.

scriptsOptional

public java.util.List<java.lang.String> getScripts();
  • Type: java.util.List< java.lang.String >
This is a list of paths (relative or absolute) to local scripts that will be copied to the remote resource and then executed. They are executed in the order they are provided. This cannot be provided with inline or script.