Skip to content

Commit

Permalink
Merge pull request #21 from babbel/resource-specific-tags
Browse files Browse the repository at this point in the history
Add support for resource-specific tags
  • Loading branch information
jansiwy authored Sep 24, 2024
2 parents b593316 + a83067b commit 123850d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resource "aws_acm_certificate" "this" {
subject_alternative_names = setsubtract(keys(var.domain_names_to_zone_ids), [var.primary_domain_name])
validation_method = "DNS"

tags = var.default_tags
tags = merge(var.default_tags, var.acm_certificate_tags)

lifecycle {
create_before_destroy = true
Expand Down
9 changes: 9 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
variable "acm_certificate_tags" {
type = map(string)
default = {}

description = <<EOS
Map of tags assigned to the ACM certificate created by this module. Tags in this map will override tags in `var.default_tags`.
EOS
}

variable "default_tags" {
type = map(string)
default = {}
Expand Down

0 comments on commit 123850d

Please sign in to comment.