File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,17 @@ locals {
33 filename_lambda_dir = abspath (" ${ path . root } /../../lambdas/filenameprocessor" )
44 filename_lambda_files = fileset (local. filename_lambda_dir , " **" )
55 filename_lambda_dir_sha = sha1 (join (" " , [for f in local . filename_lambda_files : filesha1 (" ${ local . filename_lambda_dir } /${ f } " )]))
6+ dps_bucket_for_extended_attribute = (
7+ var. environment == " prod" ? " nhsd-dspp-core-prod-extended-attributes-gdp" : " nhsd-dspp-core-ref-extended-attributes-gdp"
8+ )
9+
10+ dps_bucket_arn_for_extended_attribute = [
11+ " arn:aws:s3:::${ local . dps_bucket_for_extended_attribute } /*"
12+ ]
613}
714
15+
16+
817resource "aws_ecr_repository" "file_name_processor_lambda_repository" {
918 image_scanning_configuration {
1019 scan_on_push = true
@@ -168,10 +177,7 @@ resource "aws_iam_policy" "filenameprocessor_lambda_exec_policy" {
168177 " Action" : [
169178 " s3:PutObject"
170179 ],
171- " Resource" : [
172- " arn:aws:s3:::nhsd-dspp-core-ref-extended-attributes-gdp" ,
173- " arn:aws:s3:::nhsd-dspp-core-ref-extended-attributes-gdp/*"
174- ]
180+ " Resource" : local.dps_bucket_arn_for_extended_attribute
175181 }
176182 ]
177183 })
You can’t perform that action at this time.
0 commit comments