File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed
Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ resource "aws_api_gateway_domain_name" "custom_api_domain_mtls" {
1818 }
1919
2020 mutual_tls_authentication {
21- truststore_uri = local. is_sandbox ? " s3://ndr-dev- ${ var . truststore_bucket_name } / ${ var . ca_pem_filename } " : " s3:// ${ module . ndr-truststore [ 0 ] . bucket_id } / ${ var . ca_pem_filename } "
21+ truststore_uri = local. truststore_uri
2222 truststore_version = data. aws_s3_object . truststore_ext_cert . version_id
2323 }
2424}
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ module "ndr-truststore" {
129129}
130130
131131data "aws_s3_object" "truststore_ext_cert" {
132- bucket = local. is_sandbox ? " ndr-dev- ${ var . truststore_bucket_name } " : module . ndr-truststore [ 0 ] . bucket_id
132+ bucket = local. truststore_bucket_id
133133 key = var. ca_pem_filename
134134}
135135
Original file line number Diff line number Diff line change @@ -238,6 +238,9 @@ locals {
238238 current_account_id = data. aws_caller_identity . current . account_id
239239
240240 apim_api_url = " https://${ var . apim_environment } api.service.nhs.uk/national-document-repository"
241+
242+ truststore_bucket_id = local. is_sandbox ? " ndr-dev-${ var . truststore_bucket_name } " : module. ndr-truststore [0 ]. bucket_id
243+ truststore_uri = " s3://${ local . truststore_bucket_id } /${ var . ca_pem_filename } "
241244}
242245
243246variable "nrl_api_endpoint_suffix" {
You can’t perform that action at this time.
0 commit comments