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

Terraform Cloud Learn Tutorial - Sample PR #132

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 7 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
provider "aws" {
version = "2.33.0"

region = var.aws_region
}

provider "random" {
version = "2.2"
}
provider "random" {}

resource "random_pet" "table_name" {}

Expand All @@ -16,9 +12,15 @@ resource "aws_dynamodb_table" "tfc_example_table" {
read_capacity = var.db_read_capacity
write_capacity = var.db_write_capacity
hash_key = "UUID"
range_key = "UserName"

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

attribute {
name = "UserName"
type = "S"
}
}
16 changes: 16 additions & 0 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.28.0"
}

random = {
source = "hashicorp/random"
version = "3.0.0"
}
}

required_version = ">= 0.14.0"
}