Skip to content

Commit

Permalink
add name_tag_name, add type for tags var
Browse files Browse the repository at this point in the history
  • Loading branch information
smelchior committed Feb 28, 2018
1 parent dab4bf4 commit 8509e4c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion s3_cloudtrail.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ resource "aws_s3_bucket" "cloudtrail_bucket" {
}
}

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

resource "aws_s3_bucket_policy" "cloudtrail_bucket_policy" {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,10 @@ variable "trail_bucket_default_encryption_key" {
variable "tags" {
description = "A map of tags to add to all resources"
default = {}
type = "map"
}

variable "name_tag_name" {
description = "Name of the 'name' tag that is added to, for example, the S3 resources"
default = "Name"
}

0 comments on commit 8509e4c

Please sign in to comment.