Skip to content

Commit dc0ef78

Browse files
committed
CCM-11586: Correct references to new modules
1 parent 7112ad2 commit dc0ef78

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

infrastructure/terraform/components/api/module_domain_truststore.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ module "domain_truststore" {
1313

1414
bucket_logging_target = {
1515
bucket = module.logging_bucket.bucket
16-
prefix = "${name}/"
16+
prefix = "${local.csi_s3}-truststore/"
1717
}
1818

1919
policy_documents = [
20-
aws_iam_policy_document.truststore.json
2120
]
2221

2322
}

infrastructure/terraform/components/api/module_logging_bucket.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module "logging_bucket" {
1212
kms_key_arn = module.kms.key_id
1313

1414
policy_documents = [
15-
aws_iam_policy_document.logging.json
15+
data.aws_iam_policy_document.logging.json
1616
]
1717
}
1818

@@ -29,7 +29,7 @@ data "aws_iam_policy_document" "logging" {
2929
actions = ["s3:PutObject"]
3030

3131
resources = [
32-
"${aws_s3_bucket.logging.arn}/*",
32+
"${module.logging_bucket.arn}/*",
3333
]
3434
}
3535
}

infrastructure/terraform/components/api/s3_bucket_object_truststore.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# In manually configured (e.g. dev main, nonprod main, prod main) add lifecycle policy to permit manual management of cert
22
resource "aws_s3_object" "placeholder_truststore" {
33
count = var.manually_configure_mtls_truststore ? 1 : 0
4-
bucket = aws_s3_bucket.truststore.bucket
4+
bucket = module.domain_truststore.bucket
55
key = "truststore.pem"
66
content = module.supplier_ssl[0].cacert_pem
77

88
depends_on = [
9-
aws_s3_bucket_versioning.truststore,
9+
module.domain_truststore,
1010
module.supplier_ssl
1111
]
1212

@@ -21,12 +21,12 @@ resource "aws_s3_object" "placeholder_truststore" {
2121
# Requires duplicate block as lifecycle policies cannot be dynamic
2222
resource "aws_s3_object" "placeholder_truststore_nonprod" {
2323
count = !var.manually_configure_mtls_truststore ? 1 : 0
24-
bucket = aws_s3_bucket.truststore.bucket
24+
bucket = module.domain_truststore.bucket
2525
key = "truststore.pem"
2626
content = module.supplier_ssl[0].cacert_pem
2727

2828
depends_on = [
29-
aws_s3_bucket_versioning.truststore,
29+
module.domain_truststore,
3030
module.supplier_ssl
3131
]
3232
}

0 commit comments

Comments
 (0)