Skip to content

Commit

Permalink
Enabling DDB delete protection in dev env to validate
Browse files Browse the repository at this point in the history
  • Loading branch information
ajmu1 committed Jan 7, 2025
1 parent 1e79e55 commit 8d70730
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/automation/var/profile/demo.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ SLACK_ALERT_CHANNEL := dos-integration-dev-status

# WAF
WAF_ENABLED := true
DDB_DELETE_PROTECTION :=false

# ==============================================================================
# Performance variables
Expand Down
1 change: 1 addition & 0 deletions build/automation/var/profile/dev.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ SLACK_ALERT_CHANNEL := dos-integration-dev-status

# WAF
WAF_ENABLED := false
DDB_DELETE_PROTECTION :=true

# ==============================================================================
# Performance variables
Expand Down
1 change: 1 addition & 0 deletions build/automation/var/profile/live.mk
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ SLACK_ALERT_CHANNEL := dos-integration-live-status

# WAF
WAF_ENABLED := true
DDB_DELETE_PROTECTION :=true

# ==============================================================================
# Performance variables
Expand Down
1 change: 1 addition & 0 deletions build/automation/var/profile/pen.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

# WAF
WAF_ENABLED := true
DDB_DELETE_PROTECTION :=false
1 change: 1 addition & 0 deletions build/automation/var/profile/perf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ SLACK_ALERT_CHANNEL := dos-integration-dev-status

# WAF
WAF_ENABLED := true
DDB_DELETE_PROTECTION :=false

# ==============================================================================
# Performance variables
Expand Down
1 change: 1 addition & 0 deletions build/automation/var/profile/perf2.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ SLACK_ALERT_CHANNEL := dos-integration-dev-status

# WAF
WAF_ENABLED := true
DDB_DELETE_PROTECTION :=false

# ==============================================================================
# Performance variables
Expand Down
1 change: 1 addition & 0 deletions build/automation/var/project.mk
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ TF_VAR_shared_resources_sns_topic_app_alerts_for_slack_route53_health_check_alar

# WAF
TF_VAR_waf_enabled := $(WAF_ENABLED)
TF_VAR_ddb_delete_protection :=$(DDB_DELETE_PROTECTION)
TF_VAR_waf_acl_name := $(PROJECT_ID)-$(SHARED_ENVIRONMENT)-waf-acl
TF_VAR_waf_log_group_name := aws-waf-logs-$(PROJECT_ID)-$(SHARED_ENVIRONMENT)-waf-log-group
TF_VAR_waf_log_subscription_filter_name := $(PROJECT_ID)-$(SHARED_ENVIRONMENT)-waf-log-subscription-filter
Expand Down
1 change: 1 addition & 0 deletions infrastructure/stacks/shared-resources/dynamodb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ resource "aws_dynamodb_table" "message-history-table" {
billing_mode = "PAY_PER_REQUEST"
hash_key = "Id"
range_key = "ODSCode"
deletion_protection_enabled = var.ddb_delete_protection

server_side_encryption {
enabled = true
Expand Down
5 changes: 5 additions & 0 deletions infrastructure/stacks/shared-resources/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ variable "waf_enabled" {
description = "Whether to enable WAF"
}

variable "ddb_delete_protection" {
type = bool
description = "Whether to enable delete protection"
}

variable "waf_acl_name" {
type = string
description = "Name of the WAF ACL"
Expand Down

0 comments on commit 8d70730

Please sign in to comment.