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

Commit

Permalink
Example project
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-norwood committed Oct 21, 2019
0 parents commit f25e6ea
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Local .terraform directories
**/.terraform/*

# .tfstate files
*.tfstate
*.tfstate.*

# Crash log files
crash.log

# Ignore any .tfvars files that are generated automatically for each Terraform run. Most
# .tfvars files are managed as part of configuration and so should be included in
# version control.
#
# example.tfvars

# Ignore override files as they are usually used to override resources locally and so
# are not checked in
override.tf
override.tf.json
*_override.tf
*_override.tf.json

# Include override files you do wish to add to version control using negated pattern
#
# !example_override.tf

# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
# example: *tfplan*

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 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
22 changes: 22 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
provider "aws" {
version = "2.33.0"

region = var.aws_region
}

resource "aws_dynamodb_table" "tfc_example_table" {
name = var.db_table_name

read_capacity = var.db_read_capacity
write_capacity = var.db_write_capacity
hash_key = "UUID"

attribute {
name = "UUID"
type = "S"
}

tags = {
user_name = var.tag_user_name
}
}
3 changes: 3 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
output "tfc_example_table_arn" {
value = aws_dynamodb_table.tfc_example_table.arn
}
23 changes: 23 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
variable "aws_region" {
type = string
default = "us-west-1"
}

variable "db_table_name" {
type = string
default = "exampleTable"
}

variable "db_read_capacity" {
type = number
default = 1
}

variable "db_write_capacity" {
type = number
default = 1
}

variable "tag_user_name" {
type = string
}

0 comments on commit f25e6ea

Please sign in to comment.