From 5bdd43072099dc39bb08a02b32688e529b154c53 Mon Sep 17 00:00:00 2001 From: Sathiya Shunmugasundaram Date: Mon, 1 Jun 2015 02:45:01 -0400 Subject: [PATCH 1/3] README enhancement --- examples/aws-count/README.md | 22 ++++++++++++++++++++-- examples/aws-two-tier/README.md | 26 ++++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/examples/aws-count/README.md b/examples/aws-count/README.md index a2703f59d5..75739f6e85 100644 --- a/examples/aws-count/README.md +++ b/examples/aws-count/README.md @@ -6,5 +6,23 @@ and let you scale resources by simply incrementing a number. Additionally, variables can be used to expand a list of resources for use elsewhere. -As with all examples, just copy and paste the example and run -`terraform apply` to see it work. +To run, set the environment variables as below with correct values + +export AWS_ACCESS_KEY_ID="..." +export AWS_SECRET_ACCESS_KEY="..." +export AWS_DEFAULT_REGION="..." + +Alternatively, you can configure the provider configuration where you invoke the module. + +For example, you can use section similar to below. + +# Specify the provider and access details +provider "aws" { + region = "${var.aws_region}" + access_key = "${var.access_key}" + secret_key = "${var.secret_key}" +} + +Running the example + +run `terraform apply` to see it work. diff --git a/examples/aws-two-tier/README.md b/examples/aws-two-tier/README.md index 8a5ad61a3e..2da0b92f53 100644 --- a/examples/aws-two-tier/README.md +++ b/examples/aws-two-tier/README.md @@ -14,5 +14,27 @@ After you run `terraform apply` on this configuration, it will automatically output the DNS address of the ELB. After your instance registers, this should respond with the default nginx web page. -As with all examples, just copy and paste the example and run -`terraform apply` to see it work. +To run, set the environment variables as below with correct values + +export AWS_ACCESS_KEY_ID="..." +export AWS_SECRET_ACCESS_KEY="..." +export AWS_DEFAULT_REGION="..." + +Alternatively, you can configure the provider configuration where you invoke the module. + +For example, you can use section similar to below. + +# Specify the provider and access details +provider "aws" { + region = "${var.aws_region}" + access_key = "${var.access_key}" + secret_key = "${var.secret_key}" +} + +Running the example + +run `terraform apply -var 'key_name={your_aws_Key_name}' -var 'key_path={location_of_your_key_in_your_local_machine}'` + +example + +terraform apply -var 'key_name=terraform' -var 'key_path=/Users/jsmith/.ssh/terraform.pem \ No newline at end of file From 7f619db0e5f142ed2d4eae611c7293d8820eb242 Mon Sep 17 00:00:00 2001 From: Sathiya Shunmugasundaram Date: Mon, 1 Jun 2015 02:47:14 -0400 Subject: [PATCH 2/3] new line --- examples/aws-two-tier/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/aws-two-tier/README.md b/examples/aws-two-tier/README.md index 2da0b92f53..3d5544543a 100644 --- a/examples/aws-two-tier/README.md +++ b/examples/aws-two-tier/README.md @@ -37,4 +37,5 @@ run `terraform apply -var 'key_name={your_aws_Key_name}' -var 'key_path={locatio example -terraform apply -var 'key_name=terraform' -var 'key_path=/Users/jsmith/.ssh/terraform.pem \ No newline at end of file +terraform apply -var 'key_name=terraform' -var 'key_path=/Users/jsmith/.ssh/terraform.pem + From 60d34ae9405c0f95a125303a83dfbcdadeecb5d3 Mon Sep 17 00:00:00 2001 From: Sathiya Shunmugasundaram Date: Mon, 1 Jun 2015 08:03:05 -0400 Subject: [PATCH 3/3] Replace AWS Provider sections with link from terraform.io --- examples/aws-count/README.md | 17 +---------------- examples/aws-two-tier/README.md | 17 ++--------------- 2 files changed, 3 insertions(+), 31 deletions(-) diff --git a/examples/aws-count/README.md b/examples/aws-count/README.md index 75739f6e85..102841b94c 100644 --- a/examples/aws-count/README.md +++ b/examples/aws-count/README.md @@ -6,22 +6,7 @@ and let you scale resources by simply incrementing a number. Additionally, variables can be used to expand a list of resources for use elsewhere. -To run, set the environment variables as below with correct values - -export AWS_ACCESS_KEY_ID="..." -export AWS_SECRET_ACCESS_KEY="..." -export AWS_DEFAULT_REGION="..." - -Alternatively, you can configure the provider configuration where you invoke the module. - -For example, you can use section similar to below. - -# Specify the provider and access details -provider "aws" { - region = "${var.aws_region}" - access_key = "${var.access_key}" - secret_key = "${var.secret_key}" -} +To run, configure your AWS provider as described in https://www.terraform.io/docs/providers/aws/index.html Running the example diff --git a/examples/aws-two-tier/README.md b/examples/aws-two-tier/README.md index 3d5544543a..d79b6588e9 100644 --- a/examples/aws-two-tier/README.md +++ b/examples/aws-two-tier/README.md @@ -14,22 +14,9 @@ After you run `terraform apply` on this configuration, it will automatically output the DNS address of the ELB. After your instance registers, this should respond with the default nginx web page. -To run, set the environment variables as below with correct values +To run, configure your AWS provider as described in -export AWS_ACCESS_KEY_ID="..." -export AWS_SECRET_ACCESS_KEY="..." -export AWS_DEFAULT_REGION="..." - -Alternatively, you can configure the provider configuration where you invoke the module. - -For example, you can use section similar to below. - -# Specify the provider and access details -provider "aws" { - region = "${var.aws_region}" - access_key = "${var.access_key}" - secret_key = "${var.secret_key}" -} +https://www.terraform.io/docs/providers/aws/index.html Running the example