github.com/ezbercih/terraform@v0.1.1-0.20140729011846-3c33865e0839/website/source/docs/commands/apply.html.markdown (about) 1 --- 2 layout: "docs" 3 page_title: "Command: apply" 4 sidebar_current: "docs-commands-apply" 5 --- 6 7 # Command: apply 8 9 The `terraform apply` command is used to apply the changes required 10 to reach the desired state of the configuration, or the pre-determined 11 set of actions generated by a `terraform plan` execution plan. 12 13 ## Usage 14 15 Usage: `terraform apply [options] [dir]` 16 17 By default, `apply` scans the current directory for the configuration 18 and applies the changes appropriately. However, a path to another configuration 19 or an execution plan can be provided. Execution plans can be used to only 20 execute a pre-determined set of actions. 21 22 The command-line flags are all optional. The list of available flags are: 23 24 * `-backup=path` - Path to the backup file. Defaults to `-state-out` with 25 the ".backup" extention. Disabled by setting to "-". 26 27 * `-no-color` - Disables output with coloring. 28 29 * `-refresh=true` - Update the state for each resource prior to planning 30 and applying. This has no effect if a plan file is given directly to 31 apply. 32 33 * `-state=path` - Path to the state file. Defaults to "terraform.tfstate". 34 35 * `-state-out=path` - Path to write updated state file. By default, the 36 `-state` path will be used. 37 38 * `-var 'foo=bar'` - Set a variable in the Terraform configuration. This 39 flag can be set multiple times. 40 41 * `-var-file=foo` - Set variables in the Terraform configuration from 42 a file. If "terraform.tfvars" is present, it will be automatically 43 loaded if this flag is not specified. 44