github.com/adamar/terraform@v0.2.2-0.20141016210445-2e703afdad0e/website/source/docs/provisioners/remote-exec.html.markdown (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Provisioner: remote-exec"
     4  sidebar_current: "docs-provisioners-remote"
     5  ---
     6  
     7  # remote-exec Provisioner
     8  
     9  The `remote-exec` provisioner invokes a script on a remote resource after it
    10  is created. This can be used to run a configuration management tool, bootstrap
    11  into a cluster, etc. To invoke a local process, see the `local-exec`
    12  [provisioner](/docs/provisioners/local-exec.html) instead. The `remote-exec`
    13  provisioner only supports `ssh` type [connections](/docs/provisioners/connection.html).
    14  
    15  
    16  ## Example usage
    17  
    18  ```
    19  # Run puppet and join our Consul cluster
    20  resource "aws_instance" "web" {
    21      ...
    22      provisioner "remote-exec" {
    23          inline = [
    24          "puppet apply",
    25          "consul join ${aws_instance.web.private_ip}"
    26          ]
    27      }
    28  }
    29  ```
    30  
    31  ## Argument Reference
    32  
    33  The following arguments are supported:
    34  
    35  * `inline` - This is a list of command strings. They are executed in the order
    36    they are provided. This cannot be provided with `script` or `scripts`.
    37  
    38  * `script` - This is a path (relative or absolute) to a local script that will
    39    be copied to the remote resource and then executed. This cannot be provided
    40    with `inline` or `scripts`.
    41  
    42  * `scripts` - This is a list of paths (relative or absolute) to local scripts
    43    that will be copied to the remote resource and then executed. They are executed
    44    in the order they are provided. This cannot be provided with `inline` or `script`.
    45