Skip to content

Feature/copy db instance tags #596

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/db_instance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ resource "aws_db_instance" "this" {
}
}

tags = merge(var.tags, var.db_instance_tags)
tags = merge(var.tags, var.copy_db_instance_tags ? var.db_instance_tags : {})

depends_on = [aws_cloudwatch_log_group.this]

Expand Down
6 changes: 6 additions & 0 deletions modules/db_instance/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,12 @@ variable "db_instance_tags" {
default = {}
}

variable "copy_db_instance_tags" {
description = "If true, merge db_instance_tags with the common tags"
type = bool
default = true
}

variable "option_group_name" {
description = "Name of the DB option group to associate."
type = string
Expand Down
Loading