File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed
Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 99 " userIdentity" : {
1010 " principalId" : " AWS:AIDAINPONIXQXHT3IKHL2"
1111 },
12- " requestParameters" : {
12+ " requestParameters" : {
1313 " sourceIPAddress" : " 205.255.255.255"
1414 },
1515 " responseElements" : {
2020 " s3SchemaVersion" : " 1.0" ,
2121 " configurationId" : " 828aa6fc-f7b5-4305-8584-487c791949c1" ,
2222 " bucket" : {
23- " name" : " ${ bucket } " ,
23+ " name" : " ${ bucket } " ,
2424 " ownerIdentity" : {
2525 " principalId" : " A3I5XTEXAMAI3E"
2626 },
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ data "aws_iam_policy_document" "iam_for_lambda_policy_document" {
3838 " s3:DeleteObject" ,
3939 ]
4040 effect = " Allow"
41- resources = [aws_s3_bucket . storage . arn ]
41+ resources = [aws_s3_bucket . storage . arn , " ${ aws_s3_bucket . storage . arn } /* " ]
4242 sid = " ReadS3"
4343 }
4444
Original file line number Diff line number Diff line change @@ -36,17 +36,16 @@ output "bucket" {
3636
3737locals {
3838 our_rendered_content = templatefile (" ${ path . root } /../docker/info-event.tftpl" , {bucket = aws_s3_bucket.storage.bucket})
39+ triggers = {
40+ template_file = md5 (file (" ${ path . root } /../docker/info-event.tftpl" ))
41+ }
3942}
4043
4144resource "null_resource" "local" {
4245 triggers = {
4346 template = local.our_rendered_content
4447 }
4548
46- depends_on = [
47- aws_s3_bucket . storage ,
48- ]
49-
5049 # Render to local file on machine
5150 # https://github.com/hashicorp/terraform/issues/8090#issuecomment-291823613
5251 provisioner "local-exec" {
You can’t perform that action at this time.
0 commit comments