Skip to content

Commit bacd68a

Browse files
authored
Revert recent dynamodb changes (#69)
1 parent cf7c482 commit bacd68a

File tree

4 files changed

+2
-11
lines changed

4 files changed

+2
-11
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ Available targets:
246246
| block\_public\_policy | Whether Amazon S3 should block public bucket policies for this bucket | `bool` | `true` | no |
247247
| context | Default context to use for passing state between label invocations | <pre>object({<br> namespace = string<br> environment = string<br> stage = string<br> name = string<br> enabled = bool<br> delimiter = string<br> attributes = list(string)<br> label_order = list(string)<br> tags = map(string)<br> additional_tag_map = map(string)<br> regex_replace_chars = string<br> })</pre> | <pre>{<br> "additional_tag_map": {},<br> "attributes": [],<br> "delimiter": "",<br> "enabled": true,<br> "environment": "",<br> "label_order": [],<br> "name": "",<br> "namespace": "",<br> "regex_replace_chars": "",<br> "stage": "",<br> "tags": {}<br>}</pre> | no |
248248
| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes` | `string` | `"-"` | no |
249-
| enable\_dynamodb | Enable DynamoDB Locking | `bool` | `true` | no |
250249
| enable\_point\_in\_time\_recovery | Enable DynamoDB point-in-time recovery | `bool` | `false` | no |
251250
| enable\_public\_access\_block | Enable Bucket Public Access Block | `bool` | `true` | no |
252251
| enable\_server\_side\_encryption | Enable DynamoDB server-side encryption | `bool` | `true` | no |

docs/terraform.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
| block\_public\_policy | Whether Amazon S3 should block public bucket policies for this bucket | `bool` | `true` | no |
3131
| context | Default context to use for passing state between label invocations | <pre>object({<br> namespace = string<br> environment = string<br> stage = string<br> name = string<br> enabled = bool<br> delimiter = string<br> attributes = list(string)<br> label_order = list(string)<br> tags = map(string)<br> additional_tag_map = map(string)<br> regex_replace_chars = string<br> })</pre> | <pre>{<br> "additional_tag_map": {},<br> "attributes": [],<br> "delimiter": "",<br> "enabled": true,<br> "environment": "",<br> "label_order": [],<br> "name": "",<br> "namespace": "",<br> "regex_replace_chars": "",<br> "stage": "",<br> "tags": {}<br>}</pre> | no |
3232
| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes` | `string` | `"-"` | no |
33-
| enable\_dynamodb | Enable DynamoDB Locking | `bool` | `true` | no |
3433
| enable\_point\_in\_time\_recovery | Enable DynamoDB point-in-time recovery | `bool` | `false` | no |
3534
| enable\_public\_access\_block | Enable Bucket Public Access Block | `bool` | `true` | no |
3635
| enable\_server\_side\_encryption | Enable DynamoDB server-side encryption | `bool` | `true` | no |

main.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,12 @@ resource "aws_s3_bucket_public_access_block" "default" {
173173

174174
module "dynamodb_table_label" {
175175
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.17.0"
176-
enabled = var.enable_dynamodb
177176
context = module.base_label.context
178177
attributes = compact(concat(var.attributes, ["lock"]))
179178
}
180179

181180
resource "aws_dynamodb_table" "with_server_side_encryption" {
182-
count = var.enable_dynamodb && var.enable_server_side_encryption ? 1 : 0
181+
count = var.enable_server_side_encryption ? 1 : 0
183182
name = module.dynamodb_table_label.id
184183
billing_mode = var.billing_mode
185184
read_capacity = var.billing_mode == "PROVISIONED" ? var.read_capacity : null
@@ -213,7 +212,7 @@ resource "aws_dynamodb_table" "with_server_side_encryption" {
213212
}
214213

215214
resource "aws_dynamodb_table" "without_server_side_encryption" {
216-
count = var.enable_dynamodb || var.enable_server_side_encryption ? 0 : 1
215+
count = var.enable_server_side_encryption ? 0 : 1
217216
name = module.dynamodb_table_label.id
218217
billing_mode = var.billing_mode
219218
read_capacity = var.billing_mode == "PROVISIONED" ? var.read_capacity : null

variables.tf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,6 @@ variable "enable_public_access_block" {
139139
default = true
140140
}
141141

142-
variable "enable_dynamodb" {
143-
type = bool
144-
description = "Enable DynamoDB Locking"
145-
default = true
146-
}
147-
148142
variable "block_public_acls" {
149143
type = bool
150144
description = "Whether Amazon S3 should block public ACLs for this bucket"

0 commit comments

Comments
 (0)