Skip to content

Commit 8ac9dbf

Browse files
CCM-13930 Add DynamoDB selection tag (#351)
1 parent a83ff2e commit 8ac9dbf

7 files changed

Lines changed: 19 additions & 11 deletions

File tree

infrastructure/terraform/components/api/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ No requirements.
1717
| <a name="input_core_environment"></a> [core\_environment](#input\_core\_environment) | Environment of Core | `string` | `"prod"` | no |
1818
| <a name="input_default_tags"></a> [default\_tags](#input\_default\_tags) | A map of default tags to apply to all taggable resources within the component | `map(string)` | `{}` | no |
1919
| <a name="input_disable_gateway_execute_endpoint"></a> [disable\_gateway\_execute\_endpoint](#input\_disable\_gateway\_execute\_endpoint) | Disable the execution endpoint for the API Gateway | `bool` | `true` | no |
20-
| <a name="input_enable_backups"></a> [enable\_backups](#input\_enable\_backups) | Enable backups | `bool` | `false` | no |
2120
| <a name="input_environment"></a> [environment](#input\_environment) | The name of the tfscaffold environment | `string` | n/a | yes |
2221
| <a name="input_eventpub_control_plane_bus_arn"></a> [eventpub\_control\_plane\_bus\_arn](#input\_eventpub\_control\_plane\_bus\_arn) | ARN of the EventBridge control plane bus for eventpub | `string` | `""` | no |
2322
| <a name="input_eventpub_data_plane_bus_arn"></a> [eventpub\_data\_plane\_bus\_arn](#input\_eventpub\_data\_plane\_bus\_arn) | ARN of the EventBridge data plane bus for eventpub | `string` | `""` | no |

infrastructure/terraform/components/api/ddb_table_letters.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,10 @@ resource "aws_dynamodb_table" "letters" {
4141
enabled = true
4242
}
4343

44-
tags = var.default_tags
44+
tags = merge(
45+
local.default_tags,
46+
{
47+
NHSE-Enable-Dynamo-Backup-Acct = "True"
48+
}
49+
)
4550
}

infrastructure/terraform/components/api/ddb_table_mi.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,10 @@ resource "aws_dynamodb_table" "mi" {
2424
enabled = true
2525
}
2626

27-
tags = var.default_tags
27+
tags = merge(
28+
local.default_tags,
29+
{
30+
NHSE-Enable-Dynamo-Backup-Acct = "True"
31+
}
32+
)
2833
}

infrastructure/terraform/components/api/ddb_table_suppliers.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,10 @@ resource "aws_dynamodb_table" "suppliers" {
3030
enabled = true
3131
}
3232

33-
tags = var.default_tags
33+
tags = merge(
34+
local.default_tags,
35+
{
36+
NHSE-Enable-Dynamo-Backup-Acct = "True"
37+
}
38+
)
3439
}

infrastructure/terraform/components/api/modules_eventsub.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,5 @@ module "eventsub" {
2222
sns_success_logging_sample_percent = 0
2323

2424
event_cache_expiry_days = 30
25-
enable_event_cache = true
2625
shared_infra_account_id = var.shared_infra_account_id
2726
}

infrastructure/terraform/components/api/variables.tf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,6 @@ variable "commit_id" {
6363
default = "HEAD"
6464
}
6565

66-
variable "enable_backups" {
67-
type = bool
68-
description = "Enable backups"
69-
default = false
70-
}
71-
7266
variable "force_destroy" {
7367
type = bool
7468
description = "Flag to force deletion of S3 buckets"

infrastructure/terraform/modules/eventsub/module_s3bucket_event_cache.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ module "s3bucket_event_cache" {
4949

5050
default_tags = {
5151
Name = "Event Cache Storage"
52+
NHSE-Enable-S3-Backup-Acct = "True"
5253
}
5354
}
5455

0 commit comments

Comments
 (0)