From 9c3917f4353e081b8438d3321c5ccab72028317d Mon Sep 17 00:00:00 2001 From: Michael Perez Date: Fri, 4 Mar 2016 18:42:32 -0500 Subject: [PATCH] Update remote.html.markdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit these changes were added to reflect what was required to run the tutorial on my local machine. Below is my context for the above changes: ```shell [2016-03-04T18:22:44] micperez in terraform_test λ terraform remote config -backend-config="name=puhrez/getting-started" missing 'access_token' configuration or ATLAS_TOKEN environmental variable If the error message above mentions requiring or modifying configuration options, these are set using the `-backend-config` flag. Example: -backend-config="name=foo" to set the `name` configuration [2016-03-04T18:23:27] micperez in terraform_test λ export ATLAS_TOKEN= [2016-03-04T18:24:12] micperez in terraform_test λ terraform remote config -backend-config="name=puhrez/getting-started" Remote state management enabled Remote state configured and pulled. [2016-03-04T18:24:16] micperez in terraform_test λ terraform push -name="puhrez/getting-started" An error has occurred while archiving the module for uploading: error detecting VCS: no VCS found for path: /Users/micperez/code/terraform_test [2016-03-04T18:24:39] micperez in terraform_test λ git init Initialized empty Git repository in /Users/micperez/code/terraform_test/.git/ [2016-03-04T18:25:09] micperez in terraform_test [git:master] λ terraform push -name="puhrez/getting-started" An error has occurred while archiving the module for uploading: error getting git commit: exit status 128 stdout: stderr: fatal: bad default revision 'HEAD' [2016-03-04T18:25:12] micperez in terraform_test [git:master] λ git status On branch master Initial commit Untracked files: (use "git add ..." to include in what will be committed) .terraform/ example.tf terraform.tfstate.backup nothing added to commit but untracked files present (use "git add" to track) [2016-03-04T18:25:17] micperez in terraform_test [git:master] λ git add example.tf [2016-03-04T18:25:24] micperez in terraform_test [git:master] λ git commit -m "init commit" [master (root-commit) 34c4fa5] init commit 1 file changed, 10 insertions(+) create mode 100644 example.tf [2016-03-04T18:25:32] micperez in terraform_test [git:master] λ terraform push -name="puhrez/getting-started" Uploading Terraform configuration... Configuration "puhrez/getting-started" uploaded! (v1) ``` --- .../getting-started/remote.html.markdown | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/website/source/intro/getting-started/remote.html.markdown b/website/source/intro/getting-started/remote.html.markdown index 227553db9..ed5b1b803 100644 --- a/website/source/intro/getting-started/remote.html.markdown +++ b/website/source/intro/getting-started/remote.html.markdown @@ -29,16 +29,32 @@ from long-running Terraform processes. You can learn how to use Terraform remotely with our [interactive tutorial](https://atlas.hashicorp.com/tutorial/terraform/?utm_source=oss&utm_medium=getting-started&utm_campaign=terraform) or you can follow the outlined steps below. -First, configure [Terraform remote state storage](/docs/commands/remote.html) -with the command: +First, If you don't have an Atlas account, you can [create an account here](https://atlas.hashicorp.com/account/new?utm_source=oss&utm_medium=getting-started&utm_campaign=terraform). + +In order for the Terraform CLI to gain access to your Atlas account you're going to need to generate an access key. From the main menu, select your username in the top right corner to access your profile. Under `Personal`, click on the `Tokens` tab and hit generate. + +For the purposes of this tutorial you can use this token by exporting it to your local shell session: ``` +$ export ATLAS_TOKEN=ATLAS_ACCESS_TOKEN +``` +Replace `ATLAS_ACCESS_TOKEN` with the token generated earlier + +Then configure [Terraform remote state storage](/docs/commands/remote.html) with the command: + +``` $ terraform remote config -backend-config="name=ATLAS_USERNAME/getting-started" ``` + +Replace `ATLAS_USERNAME` with your Atlas username. -Replace `ATLAS_USERNAME` with your Atlas username. If you don't have one, you can -[create an account here](https://atlas.hashicorp.com/account/new?utm_source=oss&utm_medium=getting-started&utm_campaign=terraform). +Before you [push](/docs/commands/push.html) your Terraform configuration to Atlas you'll need to start a local version control system with at least one commit. Here is an example using `git`. +``` +$ git init +$ git add example.tf +$ git commit -m "init commit" +``` Next, [push](/docs/commands/push.html) your Terraform configuration to Atlas with: ```