Skip to content

Commit

Permalink
Merge pull request #33 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 8f3152a + 5187709 commit 27f4db4
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 @@ -2,7 +2,7 @@ resource "aws_secretsmanager_secret" "this" {
name = "${var.name_prefix}.rollbar_access_tokens"
description = "Secret value is managed via Terraform"

tags = var.default_tags
tags = merge(var.default_tags, var.secretsmanager_secret_tags)
}

resource "aws_secretsmanager_secret_version" "this" {
Expand Down
9 changes: 9 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,12 @@ variable "rollbar_tokens" {
List of objects having access tokens names and the token values which shall be loaded into the SecretsManager.
EOS
}

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

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

0 comments on commit 27f4db4

Please sign in to comment.