Skip to content

Commit

Permalink
updated tf provider
Browse files Browse the repository at this point in the history
  • Loading branch information
roarytubbs committed Jul 31, 2020
1 parent f04b2a7 commit 1307f9d
Showing 1 changed file with 30 additions and 7 deletions.
37 changes: 30 additions & 7 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
resource "random_id" "random" {
keepers = {
uuid = "${uuid()}"
}
provider "aws" {
version = "2.33.0"

region = var.aws_west
}

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

output "random" {
value = "${random_id.random.hex}"
resource "random_pet" "table_name" {}

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

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"
}

tags = {
user_name = var.tag_user_name
}
}

0 comments on commit 1307f9d

Please sign in to comment.