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