File tree Expand file tree Collapse file tree
infrastructure/stacks/api-layer Expand file tree Collapse file tree Original file line number Diff line number Diff 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+
1015data "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
2833resource "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- }
You can’t perform that action at this time.
0 commit comments