Skip to content

Commit

Permalink
Merge pull request #11 from zoitech/hotfix/policy-and-external-bucket
Browse files Browse the repository at this point in the history
Hotfix/policy and external bucket
  • Loading branch information
Geartrixy authored Aug 24, 2018
2 parents 50e8a2f + 22ce050 commit c8dcdff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ IMPROVEMENTS:
* formatted tf-files

BUG FIXES:
* n.a.
* Dependency of Bucket and BucketPolicy
* Usage of external Buckets
2 changes: 1 addition & 1 deletion cloudtrail.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CloudTrail
resource "aws_cloudtrail" "global_Default" {
name = "${var.trail_name}"
s3_bucket_name = "${aws_s3_bucket.cloudtrail_bucket.id}"
s3_bucket_name = "${local.bucket_name}"
is_multi_region_trail = true
include_global_service_events = true
enable_log_file_validation = true
Expand Down
4 changes: 0 additions & 4 deletions s3_cloudtrail.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ resource "aws_s3_bucket" "cloudtrail_bucket" {
}

tags = "${merge(var.tags, map(var.name_tag_name, format("%s", local.bucket_name)))}"
}

resource "aws_s3_bucket_policy" "cloudtrail_bucket_policy" {
bucket = "${aws_s3_bucket.cloudtrail_bucket.bucket}"

policy = <<EOF
{
Expand Down

0 comments on commit c8dcdff

Please sign in to comment.