github.com/bengesoff/terraform@v0.3.1-0.20141018223233-b25a53629922/website/source/docs/provisioners/local-exec.html.markdown (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Provisioner: local-exec"
     4  sidebar_current: "docs-provisioners-local"
     5  ---
     6  
     7  # local-exec Provisioner
     8  
     9  The `local-exec` provisioner invokes a local executable after a resource
    10  is created. This invokes a process on the machine running Terraform, not on
    11  the resource. See the `remote-exec` [provisioner](/docs/provisioners/remote-exec.html)
    12  to run commands on the resource.
    13  
    14  ## Example usage
    15  
    16  ```
    17  # Join the newly created machine to our Consul cluster
    18  resource "aws_instance" "web" {
    19      ...
    20      provisioner "local-exec" {
    21          command = "echo ${aws_instance.web.private_ip} >> private_ips.txt"
    22      }
    23  }
    24  ```
    25  
    26  ## Argument Reference
    27  
    28  The following arguments are supported:
    29  
    30  * `command` - (Required) This is the command to execute. It can be provided
    31    as a relative path to the current working directory or as an absolute path.
    32    It is evaluated in a shell, and can use environment variables or Terraform
    33    variables.
    34