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

     1  ---
     2  layout: "docs"
     3  page_title: "Command: plan"
     4  sidebar_current: "docs-commands-plan"
     5  ---
     6  
     7  # Command: plan
     8  
     9  The `terraform plan` command is used to create an execution plan. Terraform
    10  performs a refresh, unless explicitly disabled, and then determines what
    11  actions are necessary to achieve the desired state specified in the
    12  configuration files. The plan can be saved using `-out`, and then provided
    13  to `terraform apply` to ensure only the pre-planned actions are executed.
    14  
    15  ## Usage
    16  
    17  Usage: `terraform plan [options] [dir]`
    18  
    19  By default, `plan` requires no flags and looks in the current directory
    20  for the configuration and state file to refresh.
    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" extension. Disabled by setting to "-".
    26  
    27  * `-destroy` - If set, generates a plan to destroy all the known resources.
    28  
    29  * `-no-color` - Disables output with coloring.
    30  
    31  * `-out=path` - The path to save the generated execution plan. This plan
    32    can then be used with `terraform apply` to be certain that only the
    33    changes shown in this plan are applied. Read the warning on saved
    34    plans below.
    35  
    36  * `-refresh=true` - Update the state prior to checking for differences.
    37  
    38  * `-state=path` - Path to the state file. Defaults to "terraform.tfstate".
    39  
    40  * `-var 'foo=bar'` - Set a variable in the Terraform configuration. This
    41    flag can be set multiple times.
    42  
    43  * `-var-file=foo` - Set variables in the Terraform configuration from
    44     a file. If "terraform.tfvars" is present, it will be automatically
    45     loaded if this flag is not specified.
    46  
    47  ## Security Warning
    48  
    49  Saved plan files (with the `-out` flag) encode the configuration,
    50  state, diff, and _variables_. Variables are often used to store secrets.
    51  Therefore, the plan file can potentially store secrets.
    52  
    53  Terraform itself does not encrypt the plan file. It is highly
    54  recommended to encrypt the plan file if you intend to transfer it
    55  or keep it at rest for an extended period of time.
    56  
    57  Future versions of Terraform will make plan files more
    58  secure.