Skip to content

Commit

Permalink
Merge pull request #21 from babbel/default-tags
Browse files Browse the repository at this point in the history
Breaking change: Rename `var.tags` to `var.default_tags`
  • Loading branch information
jansiwy authored Sep 23, 2024
2 parents 1b9ea13 + df235d6 commit 92d5536
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,5 @@ module "ses-sending-domain-example" {
domain_name = "example.com"
route53_zone = aws_route53_zone.email-example
sns_topic_name = "example"
tags = {
environment = "production"
}
}
```
6 changes: 5 additions & 1 deletion _test/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ module "ses-sending-domain" {
zone_id = "123"
}
sns_topic_name = "foo"
tags = {}

default_tags = {
app = "example"
env = "test"
}
}
2 changes: 1 addition & 1 deletion notifications.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "aws_sns_topic" "this" {
name = var.sns_topic_name
tags = var.tags
tags = var.default_tags
}

resource "aws_ses_identity_notification_topic" "bounce" {
Expand Down
18 changes: 9 additions & 9 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
variable "default_tags" {
type = map(string)
default = {}

description = <<EOS
Map of tags assigned to all AWS resources created by this module.
EOS
}

variable "domain_name" {
type = string

Expand Down Expand Up @@ -25,12 +34,3 @@ variable "sns_topic_name" {
Name of SNS topic.
EOS
}

variable "tags" {
type = map(string)
default = {}

description = <<EOS
Map of tags assigned to all AWS resources created by this module.
EOS
}

0 comments on commit 92d5536

Please sign in to comment.