Skip to content

Instantly share code, notes, and snippets.

@asantos82
asantos82 / cfn.yml
Created August 28, 2023 13:56
CFN S3Bucket Policy for Org Cloudtrail
S3Policy:
Type: "AWS::S3::BucketPolicy"
Properties:
Bucket: !Ref S3BucketTrail
PolicyDocument:
Statement:
- Sid: AWSCloudTrailAclCheck
Effect: Allow
Principal:
Service:
Thu Mar 21 17:51:28 UTC 2019
resource "aws_iam_policy" "policy" {
count = "${length(var.policy_file)}"
name = "${var.policy_file[count.index]}"
path = "/"
description = ""
policy = "${file("${dirname("${path.root}")}/${var.aws_account_name}/${var.policy_file[count.index]}")}"
}