Skip to content

Commit cc82530

Browse files
Revert "trust store"
This reverts commit 5759660.
1 parent 5759660 commit cc82530

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

infrastructure/stacks/api-layer/truststore_s3_bucket.tf

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ module "s3_truststore_bucket" {
77
workspace = terraform.workspace
88
}
99

10+
resource "aws_s3_bucket_policy" "truststore" {
11+
bucket = module.s3_truststore_bucket.storage_bucket_id
12+
policy = data.aws_iam_policy_document.truststore_api_gateway.json
13+
}
14+
1015
data "aws_iam_policy_document" "truststore_api_gateway" {
1116
statement {
1217
sid = "Enable S3 access permissions for API Gateway"
@@ -26,16 +31,9 @@ data "aws_iam_policy_document" "truststore_api_gateway" {
2631
}
2732

2833
resource "aws_s3_object" "pem_file" {
29-
bucket = module.s3_truststore_bucket.storage_bucket_id
34+
bucket = module.s3_truststore_bucket.storage_bucket_name
3035
key = "truststore.pem"
3136
content = local.pem_file_content
3237

3338
acl = "private"
3439
}
35-
36-
resource "aws_s3_bucket_policy" "truststore" {
37-
bucket = module.s3_truststore_bucket.storage_bucket_id
38-
policy = data.aws_iam_policy_document.truststore_api_gateway.json
39-
40-
depends_on = [aws_s3_object.pem_file]
41-
}

0 commit comments

Comments
 (0)