Skip to content

Commit

Permalink
Breaking change: Rename var.tags to var.default_tags
Browse files Browse the repository at this point in the history
  • Loading branch information
jansiwy committed Sep 23, 2024
1 parent 153edc5 commit 34ce3a7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 20 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,5 @@ module "sns-to-rollbar" {
environment = "test"
level = "debug"
tags = {
app = "some-service"
env = "test"
}
}
```
12 changes: 6 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

resource "aws_sns_topic" "this" {
name = var.name
tags = var.tags
tags = var.default_tags
}

resource "aws_sns_topic_subscription" "sqs-queue" {
Expand All @@ -15,7 +15,7 @@ resource "aws_sns_topic_subscription" "sqs-queue" {

resource "aws_sqs_queue" "this" {
name = var.name
tags = var.tags
tags = var.default_tags
}

data "aws_iam_policy_document" "sqs-queue-consume" {
Expand Down Expand Up @@ -73,7 +73,7 @@ resource "aws_pipes_pipe" "this" {
}
}

tags = var.tags
tags = var.default_tags

depends_on = [
aws_iam_role_policy.pipes-pipe-sqs-queue-consume,
Expand All @@ -84,7 +84,7 @@ resource "aws_pipes_pipe" "this" {
resource "aws_iam_role" "pipes-pipe" {
name = "pipes-${var.name}"
assume_role_policy = data.aws_iam_policy_document.pipes-assume-role.json
tags = var.tags
tags = var.default_tags
}

data "aws_iam_policy_document" "pipes-assume-role" {
Expand Down Expand Up @@ -284,7 +284,7 @@ resource "aws_sfn_state_machine" "this" {
})
)

tags = var.tags
tags = var.default_tags
}

data "aws_iam_policy_document" "sfn-state-machine-start-execution" {
Expand All @@ -297,7 +297,7 @@ data "aws_iam_policy_document" "sfn-state-machine-start-execution" {
resource "aws_iam_role" "sfn-state-machine" {
name = "step-function-${var.name}"
assume_role_policy = data.aws_iam_policy_document.states.json
tags = var.tags
tags = var.default_tags
}

data "aws_iam_policy_document" "states" {
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 "environment" {
type = string

Expand Down Expand Up @@ -41,12 +50,3 @@ variable "rollbar_project_access_token" {
The Rollbar project access token used to post items to Rollbar. It must the `post_server_item` scope.
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 34ce3a7

Please sign in to comment.