> ## Documentation Index
> Fetch the complete documentation index at: https://cdktn.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Typescript: RemoteExecProvisioner

> CDKTN Core API Reference for RemoteExecProvisioner in Typescript.

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](https://developer.hashicorp.com/terraform/language/resources/provisioners/remote-exec)

## Initializer <a name="Initializer" id="cdktn.RemoteExecProvisioner.Initializer" />

```typescript theme={null}
import { RemoteExecProvisioner } from 'cdktn'

const remoteExecProvisioner: RemoteExecProvisioner = { ... }
```

## Properties <a name="Properties" id="Properties" />

| **Name**                                                                               | **Type**                                                                                                                                                          | **Description**                                                                                                                                  |
| -------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| <code><a href="#cdktn.RemoteExecProvisioner.property.type">type</a></code>             | <code>string</code>                                                                                                                                               | *No description.*                                                                                                                                |
| <code><a href="#cdktn.RemoteExecProvisioner.property.connection">connection</a></code> | <code><a href="#cdktn.SSHProvisionerConnection">SSHProvisionerConnection</a> \| <a href="#cdktn.WinrmProvisionerConnection">WinrmProvisionerConnection</a></code> | Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect. |
| <code><a href="#cdktn.RemoteExecProvisioner.property.inline">inline</a></code>         | <code>string\[]</code>                                                                                                                                            | This is a list of command strings.                                                                                                               |
| <code><a href="#cdktn.RemoteExecProvisioner.property.script">script</a></code>         | <code>string</code>                                                                                                                                               | This is a path (relative or absolute) to a local script that will be copied to the remote resource and then executed.                            |
| <code><a href="#cdktn.RemoteExecProvisioner.property.scripts">scripts</a></code>       | <code>string\[]</code>                                                                                                                                            | This is a list of paths (relative or absolute) to local scripts that will be copied to the remote resource and then executed.                    |

***

### `type`<sup>Required</sup> <a name="type" id="cdktn.RemoteExecProvisioner.property.type" />

```typescript theme={null}
public readonly type: string;
```

* *Type:* string

***

### `connection`<sup>Optional</sup> <a name="connection" id="cdktn.RemoteExecProvisioner.property.connection" />

```typescript theme={null}
public readonly connection: SSHProvisionerConnection | WinrmProvisionerConnection;
```

* *Type:* <a href="#cdktn.SSHProvisionerConnection">SSHProvisionerConnection</a> | <a href="#cdktn.WinrmProvisionerConnection">WinrmProvisionerConnection</a>

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.

***

### `inline`<sup>Optional</sup> <a name="inline" id="cdktn.RemoteExecProvisioner.property.inline" />

```typescript theme={null}
public readonly inline: string[];
```

* *Type:* 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.

***

### `script`<sup>Optional</sup> <a name="script" id="cdktn.RemoteExecProvisioner.property.script" />

```typescript theme={null}
public readonly script: string;
```

* *Type:* 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.

***

### `scripts`<sup>Optional</sup> <a name="scripts" id="cdktn.RemoteExecProvisioner.property.scripts" />

```typescript theme={null}
public readonly scripts: string[];
```

* *Type:* 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.

***
