Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions terraform/account-wide-infrastructure/dev/aws-backup.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,6 @@ resource "aws_s3_bucket_acl" "backup_reports" {
acl = "private"
}

# We need a key for the SNS topic that will be used for notifications from AWS Backup. This key
# will be used to encrypt the messages sent to the topic before they are sent to the subscribers,
# but isn't needed by the recipients of the messages.

# First we need some contextual data
data "aws_caller_identity" "current" {}
data "aws_region" "current" {}

# Now we can define the key itself
resource "aws_kms_key" "backup_notifications" {
description = "KMS key for AWS Backup notifications"
deletion_window_in_days = 7
Expand Down Expand Up @@ -101,8 +92,6 @@ resource "aws_kms_key" "backup_notifications" {
})
}

# Now we can deploy the source and destination modules, referencing the resources we've created above.

module "source" {
source = "../modules/backup-source"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@ resource "aws_backup_selection" "dynamodb" {
selection_tag {
key = var.backup_plan_config_dynamodb.selection_tag
type = "STRINGEQUALS"
value = "true"
value = "True"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resource "aws_s3_bucket" "authorization-store" {
tags = {
Name = "authorization store"
Environment = "${var.name_prefix}"
NHSE-Enable-S3-Backup = "${var.enable_backups}"
NHSE-Enable-S3-Backup = var.enable_backups ? "True" : "False"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,7 @@ resource "aws_dynamodb_table" "pointers" {
enabled = var.enable_pitr
}

tags = { NHSE-Enable-DDB-Backup = "${var.enable_backups}" }
tags = {
NHSE-Enable-DDB-Backup = var.enable_backups ? "True" : "False"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
resource "aws_s3_bucket" "api_truststore" {
bucket = "${var.name_prefix}-api-truststore"
force_destroy = var.enable_bucket_force_destroy
tags = { NHSE-Enable-S3-Backup = "${var.enable_backups}" }
tags = {
NHSE-Enable-S3-Backup = var.enable_backups ? "True" : "False"
}
}

resource "aws_s3_bucket_policy" "api_truststore_bucket_policy" {
Expand Down