Skip to content

Commit 95628d5

Browse files
committed
CCM-9037: add internal s3 bucket
1 parent 0f0d94c commit 95628d5

File tree

5 files changed

+39
-0
lines changed

5 files changed

+39
-0
lines changed

infrastructure/terraform/components/app/module_backend_api.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ module "backend_api" {
1616
enable_backup = var.destination_vault_arn != null ? true : false
1717

1818
enable_letters = var.enable_letters
19+
20+
kms_key_arn = module.kms.key_arn
1921
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module "kms" {
2+
source = "git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/kms?ref=v1.0.8"
3+
4+
aws_account_id = var.aws_account_id
5+
component = var.component
6+
environment = var.environment
7+
project = var.project
8+
region = var.region
9+
10+
name = "main"
11+
deletion_window = var.kms_deletion_window
12+
alias = "alias/${local.csi}"
13+
}

infrastructure/terraform/components/sandbox/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,9 @@ variable "log_retention_in_days" {
5656
description = "The retention period in days for the Cloudwatch Logs events to be retained, default of 0 is indefinite"
5757
default = 0
5858
}
59+
60+
variable "kms_deletion_window" {
61+
type = string
62+
description = "When a kms key is deleted, how long should it wait in the pending deletion state?"
63+
default = "30"
64+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module "s3bucket_internal" {
2+
source = "git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/s3bucket?ref=v1.0.8"
3+
4+
name = "internal"
5+
6+
aws_account_id = var.aws_account_id
7+
region = var.region
8+
project = var.project
9+
environment = var.environment
10+
component = var.component
11+
12+
kms_key_arn = var.kms_key_arn
13+
}

infrastructure/terraform/modules/backend-api/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,8 @@ variable "enable_letters" {
7171
type = bool
7272
description = "Enable letters feature flag"
7373
}
74+
75+
variable "kms_key_arn" {
76+
type = string
77+
description = "KMS Key ARN"
78+
}

0 commit comments

Comments
 (0)