github.com/armen/terraform@v0.5.2-0.20150529052519-caa8117a08f1/website/source/docs/commands/push.html.markdown (about) 1 --- 2 layout: "docs" 3 page_title: "Command: push" 4 sidebar_current: "docs-commands-push" 5 description: |- 6 The `terraform push` command is used to upload the Terraform configuration to HashiCorp's Atlas service for automatically managing your infrastructure in the cloud. 7 --- 8 9 # Command: push 10 11 The `terraform push` command uploads your Terraform configuration to 12 be managed by HashiCorp's [Atlas](https://atlas.hashicorp.com). 13 By uploading your configuration to Atlas, Atlas can automatically run 14 Terraform for you, will save all state transitions, will save plans, 15 and will keep a history of all Terraform runs. 16 17 This makes it significantly easier to use Terraform as a team: team 18 members modify the Terraform configurations locally and continue to 19 use normal version control. When the Terraform configurations are ready 20 to be run, they are pushed to Atlas, and any member of your team can 21 run Terraform with the push of a button. 22 23 Atlas can also be used to set ACLs on who can run Terraform, and a 24 future update of Atlas will allow parallel Terraform runs and automatically 25 perform infrastructure locking so only one run is modifying the same 26 infrastructure at a time. 27 28 ## Usage 29 30 Usage: `terraform push [options] [path]` 31 32 The `path` argument is the same as for the 33 [apply](/docs/commands/apply.html) command. 34 35 The command-line flags are all optional. The list of available flags are: 36 37 * `-atlas-address=<url>` - An alternate address to an Atlas instance. 38 Defaults to `https://atlas.hashicorp.com`. 39 40 * `-upload-modules=true` - If true (default), then the 41 [modules](/docs/modules/index.html) 42 being used are all locked at their current checkout and uploaded 43 completely to Atlas. This prevents Atlas from running `terraform get` 44 for you. 45 46 * `-name=<name>` - Name of the infrastructure configuration in Atlas. 47 The format of this is: "username/name" so that you can upload 48 configurations not just to your account but to other accounts and 49 organizations. This setting can also be set in the configuration 50 in the 51 [Atlas section](/docs/configuration/atlas.html). 52 53 * `-no-color` - Disables output with coloring 54 55 * `-token=<token>` - Atlas API token to use to authorize the upload. 56 If blank or unspecified, the `ATLAS_TOKEN` environmental variable 57 will be used. 58 59 * `-vcs=true` - If true (default), then Terraform will detect if a VCS 60 is in use, such as Git, and will only upload files that are comitted to 61 version control. If no version control system is detected, Terraform will 62 upload all files in `path` (parameter to the command). 63 64 ## Packaged Files 65 66 The files that are uploaded and packaged with a `push` are all the 67 files in the `path` given as the parameter to the command, recursively. 68 By default (unless `-vcs=false` is specified), Terraform will automatically 69 detect when a VCS such as Git is being used, and in that case will only 70 upload the files that are comitted. Because of this built-in intelligence, 71 you don't have to worry about excluding folders such as ".git" or ".hg" usually. 72 73 If Terraform doesn't detect a VCS, it will upload all files. 74 75 The reason Terraform uploads all of these files is because Terraform 76 cannot know what is and isn't being used for provisioning, so it uploads 77 all the files to be safe. To exclude certain files, specify the `-exclude` 78 flag when pushing, or specify the `exclude` parameter in the 79 [Atlas configuration section](/docs/configuration/atlas.html). 80 81 ## Remote State Requirement 82 83 `terraform push` requires that 84 [remote state](/docs/commands/remote-config.html) 85 is enabled. The reasoning for this is simple: `terraform push` sends your 86 configuration to be managed remotely. For it to keep the state in sync 87 and for you to be able to easily access that state, remote state must 88 be enabled instead of juggling local files. 89 90 While `terraform push` sends your configuration to be managed by Atlas, 91 the remote state backend _does not_ have to be Atlas. It can be anything 92 as long as it is accessible by the public internet, since Atlas will need 93 to be able to communicate to it. 94 95 **Warning:** The credentials for accessing the remote state will be 96 sent up to Atlas as well. Therefore, we recommend you use access keys 97 that are restricted if possible.