File tree Expand file tree Collapse file tree 3 files changed +33
-2
lines changed Expand file tree Collapse file tree 3 files changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ module "consumer" {
123123
124124module "exporter" {
125125 source = " ../ephemeral_service"
126- depends_on = [aws_iam_policy . queue , aws_iam_policy . secrets ]
126+ depends_on = [aws_iam_policy . exports , aws_iam_policy . secrets ]
127127
128128 project = var. project
129129 environment = var. environment
@@ -135,7 +135,7 @@ module "exporter" {
135135 logging_key_id = var. logging_key_arn
136136 otel_ssm_parameter_arn = module. otel_config . ssm_parameter_arn
137137 execution_policies = [aws_iam_policy . secrets . arn ]
138- task_policies = [aws_iam_policy . queue . arn ]
138+ task_policies = [aws_iam_policy . exports . arn ]
139139 dockerfile = " Dockerfile.exporter"
140140 docker_context = " ${ path . module } /../../../"
141141
Original file line number Diff line number Diff line change 1+ resource "aws_iam_policy" "exports" {
2+ name_prefix = " ${ local . prefix } -exports-access-"
3+ description = " Allow access to the S3 bucket for Senzing exports."
4+
5+ policy = jsonencode (yamldecode (templatefile (" ${ path . module } /templates/exports-access-policy.yaml.tftpl" , {
6+ bucket_arn = module.s3.arn
7+ kms_arn = aws_kms_key.queue.arn
8+ })))
9+
10+ tags = var. tags
11+
12+ lifecycle {
13+ create_before_destroy = true
14+ }
15+ }
16+
117resource "aws_iam_policy" "queue" {
218 name_prefix = " ${ local . prefix } -queue-access-"
319 description = " Allow access to the SQS queues for Senzing."
Original file line number Diff line number Diff line change 1+ Version: '2012 - 10 - 17 '
2+ Statement:
3+ - Sid: KeyAccess
4+ Effect: Allow
5+ Action:
6+ - kms: Decrypt
7+ - kms: GenerateDataKey
8+ Resource:
9+ - " ${ kms_arn } "
10+ - Sid: S3Access
11+ Effect: Allow
12+ Action:
13+ - s3: PutObject
14+ Resource:
15+ - " ${ bucket_arn } "
You can’t perform that action at this time.
0 commit comments