Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Fix tutorial PR creation #115

Merged
merged 35 commits into from
Sep 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
a79b607
Fix broken link for tf cloud
adityaprakash-bobby Feb 1, 2020
af8072d
Merge pull request #12 from adityaprakash-bobby/fix-link
robin-norwood Mar 2, 2020
1b66c30
add datetime to db name, so itll be unique per run
im2nguyen May 12, 2020
adf6dd1
changed to random pet instead of datetime
im2nguyen May 13, 2020
d5ec7d0
Explicit provider block for random
robin-norwood May 13, 2020
d695613
Merge pull request #42 from hashicorp/unique-table-name
robin-norwood May 13, 2020
7e4900f
Update main.tf
michellegreer Jul 24, 2020
efcd12c
Merge pull request #87 from michellegreer/change-az
michellegreer Jul 24, 2020
dfb0343
Revert "Change az"
michellegreer Jul 24, 2020
33cf316
Update README.md
roarytubbs Jul 31, 2020
1a8899f
Update main.tf
roarytubbs Jul 31, 2020
f04b2a7
Update main.tf
roarytubbs Jul 31, 2020
1307f9d
updated tf provider
roarytubbs Jul 31, 2020
a6f3268
Revert "updated tf provider"
roarytubbs Jul 31, 2020
b48bf47
Revert "Update main.tf"
roarytubbs Jul 31, 2020
cf9ceb2
Revert "Update main.tf"
roarytubbs Jul 31, 2020
ad729a4
Revert "Update README.md"
roarytubbs Jul 31, 2020
38e9ae4
Update main.tf
jcatalano0918 Aug 4, 2020
8c30720
Merge pull request #100 from BU-Demo/master
mikenomitch Aug 6, 2020
e100849
Merge pull request #88 from hashicorp/revert-87-change-az
mikenomitch Aug 6, 2020
9535d68
Adds explicit variables for aws keys for better error messaging
mikenomitch Aug 6, 2020
fef5412
Merge pull request #101 from hashicorp/mnomitch/explicit-vars-for-aws…
mikenomitch Aug 6, 2020
4a074c6
Remove tag_user_name variable
mikenomitch Aug 11, 2020
d9f877b
Merge pull request #103 from hashicorp/mnomitch/remove-unnecessary-var
mikenomitch Aug 11, 2020
c9319b7
Add links to readme
mikenomitch Aug 11, 2020
7d90f02
Minor readme tweaks
mikenomitch Aug 11, 2020
49d6194
Merge pull request #104 from hashicorp/mnomitch/readme-tweaks
mikenomitch Aug 11, 2020
c621f1b
Make AWS keys env variables again (for consistency with documentation)
mikenomitch Aug 14, 2020
1001cde
Merge pull request #106 from hashicorp/mnomitch/env-var-aws-keys
mikenomitch Aug 14, 2020
10ae4d4
Readd variable for documentation consistency
mikenomitch Aug 14, 2020
ab5a1da
Merge pull request #108 from hashicorp/mnomitch/re-add-tag_user_name-var
mikenomitch Aug 14, 2020
020a293
Add CODEOWNERS
acidprime Aug 14, 2020
490efa8
Merge pull request #109 from hashicorp/codeowners
acidprime Aug 14, 2020
48dee36
Remove username, reconcile with Learn guide
im2nguyen Aug 26, 2020
2f87d01
Add UserName key to demonstrate configuration changes.
robin-norwood Oct 23, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This content is referenced on learn.hashicorp.com
# and needs review before merges as that content may break.
*.tf @hashicorp/terraform-education @mikenomitch
*.md @hashicorp/terraform-education @mikenomitch
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# Terraform Cloud Getting Started Guide Example

This is an example Terraform configuration intended for use with the Terraform Cloud Getting Started Guide hosted at https://learn.hashicorp.com/terraform/cloud/tf_cloud_overview
This is an example Terraform configuration intended for use with the [Terraform Cloud Getting Started Guide](https://learn.hashicorp.com/terraform/cloud-gettingstarted/tfc_overview).

## What will this do?

This is a simple Terraform configuration that will create an empty [DynamoDB](https://aws.amazon.com/dynamodb/) table using your AWS account.

When you set up a Workspace on Terraform Cloud, you can link to this repository. Terraform Cloud can then run `terraform plan` and `terraform apply` automatically when changes are pushed. For more information on how Terraform Cloud interacts with Version Control Systems, see [our VCS documentation](https://www.terraform.io/docs/cloud/run/ui.html).

## What are the prerequisites?

You must have an AWS account and provide your AWS Access Key ID and AWS Secret Access Key to Terraform Cloud. Terraform Cloud encrypts and stores variables using [Vault](https://www.vaultproject.io/). For more information on how to store variables in Terraform Cloud, see [our variable documentation](https://www.terraform.io/docs/cloud/workspaces/variables.html).

The values for `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` should be saved as environment variables on your workspace.
12 changes: 7 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ provider "aws" {
region = var.aws_region
}

provider "random" {
version = "2.2"
}

resource "random_pet" "table_name" {}

resource "aws_dynamodb_table" "tfc_example_table" {
name = var.db_table_name
name = "${var.db_table_name}-${random_pet.table_name.id}"

read_capacity = var.db_read_capacity
write_capacity = var.db_write_capacity
Expand All @@ -21,8 +27,4 @@ resource "aws_dynamodb_table" "tfc_example_table" {
name = "UserName"
type = "S"
}

tags = {
user_name = var.tag_user_name
}
}
6 changes: 1 addition & 5 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ variable "aws_region" {

variable "db_table_name" {
type = string
default = "exampleTable"
default = "terraform-learn"
}

variable "db_read_capacity" {
Expand All @@ -17,7 +17,3 @@ variable "db_write_capacity" {
type = number
default = 1
}

variable "tag_user_name" {
type = string
}