Skip to content

Commit 50cf200

Browse files
authored
Merge pull request #249 from NHSDigital/feature/eja-eli-343-adding-deletion-protection-and-IG-public-access-block
Feature/eja eli 343 adding deletion protection and ig public access block
2 parents 3f05f51 + e8a62c4 commit 50cf200

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

infrastructure/modules/dynamodb/dynamodb.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ resource "aws_dynamodb_table" "dynamodb_table" {
22
name = "${terraform.workspace == "default" ? "" : "${terraform.workspace}-"}${var.project_name}-${var.environment}-${var.table_name_suffix}"
33
billing_mode = "PAY_PER_REQUEST"
44
hash_key = var.partition_key
5+
deletion_protection_enabled = var.environment == "prod"
56

67
attribute {
78
name = var.partition_key

infrastructure/stacks/networking/vpc.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,8 @@ resource "aws_default_security_group" "default_vpc" {
2121
}
2222
)
2323
}
24+
25+
# EC2.172 - block internet gateway access at the account level
26+
resource "aws_vpc_block_public_access_options" "default_vpc" {
27+
internet_gateway_block_mode = "block-bidirectional"
28+
}

0 commit comments

Comments
 (0)