Skip to content

Commit 3edfcc9

Browse files
committed
NDR-213 Index truststore bucket
1 parent 90a3888 commit 3edfcc9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

infrastructure/api_mtls.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ resource "aws_api_gateway_domain_name" "custom_api_domain_mtls" {
1818
}
1919

2020
mutual_tls_authentication {
21-
truststore_uri = "s3://${terraform.workspace}-${var.truststore_bucket_name}/${var.ca_pem_filename}"
21+
truststore_uri = "s3://${module.ndr-truststore[0].bucket_id}/${var.ca_pem_filename}"
22+
truststore_version = data.aws_s3_object.truststore_ext_cert.version_id
2223
}
2324
}
2425

infrastructure/buckets.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ module "ndr-truststore" {
128128
force_destroy = local.is_force_destroy
129129
}
130130

131+
data "aws_s3_object" "truststore_ext_cert" {
132+
bucket = module.ndr_truststore[0].bucket_id
133+
key = var.ca_pem_filename
134+
}
135+
131136
# Lifecycle Rules
132137
resource "aws_s3_bucket_lifecycle_configuration" "lg-lifecycle-rules" {
133138
bucket = module.ndr-lloyd-george-store.bucket_id

0 commit comments

Comments
 (0)