Skip to content

Commit

Permalink
Merge pull request #2 from QuiNovas/develop
Browse files Browse the repository at this point in the history
forgot the “local” descriptor
  • Loading branch information
joseph-wortmann authored Aug 23, 2018
2 parents 998f626 + 7be7c27 commit da95f0e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cloudwatch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ data "aws_iam_policy_document" "cloudwatch_assume_role" {

resource "aws_iam_role" "cloudwatch_logs" {
assume_role_policy = "${data.aws_iam_policy_document.cloudwatch_assume_role.json}"
name = "${associated_resource_name}"
name = "${local.associated_resource_name}"
}

resource "aws_cloudwatch_log_group" "cloudtrail" {
name = "${associated_resource_name}"
name = "${local.associated_resource_name}"
retention_in_days = 7
}

Expand Down
2 changes: 1 addition & 1 deletion kms-key.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ resource "aws_kms_key" "cloudtrail" {
}

resource "aws_kms_alias" "cloudtrail" {
name = "alias/${associated_resource_name}"
name = "alias/${local.associated_resource_name}"
target_key_id = "${aws_kms_key.cloudtrail.key_id}"
}

4 changes: 2 additions & 2 deletions s3-bucket.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "aws_s3_bucket" "cloudtrail" {
acl = "log-delivery-write"
bucket = "${associated_resource_name}"
bucket = "${local.associated_resource_name}"

lifecycle_rule {
id = "log"
Expand All @@ -23,7 +23,7 @@ resource "aws_s3_bucket" "cloudtrail" {

logging {
target_bucket = "${var.log_bucket}"
target_prefix = "s3/${associated_resource_name}/"
target_prefix = "s3/${local.associated_resource_name}/"
}
}

Expand Down
2 changes: 1 addition & 1 deletion sns-topic.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "aws_sns_topic" "cloudtrail" {
name = "${associated_resource_name}"
name = "${local.associated_resource_name}"
}

data "aws_iam_policy_document" "cloudtrail_sns" {
Expand Down

0 comments on commit da95f0e

Please sign in to comment.