Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

Commit

Permalink
VHS dynamo fixes (#138)
Browse files Browse the repository at this point in the history
* Fix for VHS dynamop

* release

* getting booly

* booling on down to bool town

* there are no stairs in my house

* Apply auto-formatting rules
  • Loading branch information
kenoir committed Jan 14, 2019
1 parent 79d6fc3 commit 03da471
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 47 deletions.
3 changes: 3 additions & 0 deletions RELEASE.md
@@ -0,0 +1,3 @@
RELEASE_TYPE: minor

Fixes for VHS dynamo module
4 changes: 0 additions & 4 deletions ecr/repository.tf
@@ -1,7 +1,3 @@
resource "aws_ecr_repository" "repository" {
name = "${var.namespace}/${var.id}"

lifecycle {
prevent_destroy = "${var.protected}"
}
}
5 changes: 0 additions & 5 deletions ecr/variables.tf
Expand Up @@ -5,8 +5,3 @@ variable "id" {
variable "namespace" {
description = "Namespace prefix to ECR repository"
}

variable "protected" {
description = "Protect resource from deletion"
default = true
}
13 changes: 1 addition & 12 deletions vhs/modules/dynamo/main.tf
@@ -1,24 +1,13 @@
resource "aws_dynamodb_table" "table" {
name = "${var.table_name_prefix}${var.name}"
read_capacity = 1
write_capacity = 1
hash_key = "id"
stream_enabled = true
stream_view_type = "NEW_AND_OLD_IMAGES"

billing_mode = "${var.billing_mode}"
billing_mode = "PAY_PER_REQUEST"

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

lifecycle {
prevent_destroy = true

ignore_changes = [
"read_capacity",
"write_capacity",
]
}
}
4 changes: 0 additions & 4 deletions vhs/modules/dynamo/variables.tf
Expand Up @@ -3,7 +3,3 @@ variable "table_name_prefix" {
}

variable "name" {}

variable "billing_mode" {
description = "Should be either PAY_PER_REQUEST or PROVISIONED"
}
9 changes: 0 additions & 9 deletions vhs/modules/vhs/main.tf
@@ -1,17 +1,8 @@
module "dynamo" {
source = "../dynamo"
name = "${var.name}"

table_read_max_capacity = "${var.table_read_max_capacity}"
table_write_max_capacity = "${var.table_write_max_capacity}"

billing_mode = "${var.billing_mode}"
}

resource "aws_s3_bucket" "bucket" {
bucket = "${var.bucket_name_prefix}${lower(var.name)}"

lifecycle {
prevent_destroy = true
}
}
13 changes: 0 additions & 13 deletions vhs/modules/vhs/variables.tf
Expand Up @@ -3,16 +3,3 @@ variable "name" {}
variable "bucket_name_prefix" {
default = "wellcomecollection-vhs-"
}

variable "table_read_max_capacity" {
default = 80
}

variable "table_write_max_capacity" {
default = 300
}

variable "billing_mode" {
default = "PAY_PER_REQUEST"
description = "Should be either PAY_PER_REQUEST or PROVISIONED"
}

0 comments on commit 03da471

Please sign in to comment.