Skip to content

Commit 8b46fbc

Browse files
feat: AWS Instance Scheduler Tagging Support (#198)
1 parent 5f3c50d commit 8b46fbc

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ No Modules.
132132
| backtrack\_window | The target backtrack window, in seconds. Only available for aurora engine currently. To disable backtracking, set this value to 0. Defaults to 0. Must be between 0 and 259200 (72 hours) | `number` | `0` | no |
133133
| backup\_retention\_period | How long to keep backups for (in days) | `number` | `7` | no |
134134
| ca\_cert\_identifier | The identifier of the CA certificate for the DB instance | `string` | `"rds-ca-2019"` | no |
135+
| cluster\_tags | A map of tags to add to only the RDS cluster. Used for AWS Instance Scheduler tagging. | `map(string)` | `{}` | no |
135136
| copy\_tags\_to\_snapshot | Copy all Cluster tags to snapshots. | `bool` | `false` | no |
136137
| create\_cluster | Controls if RDS cluster should be created (it affects almost all resources) | `bool` | `true` | no |
137138
| create\_monitoring\_role | Whether to create the IAM role for RDS enhanced monitoring | `bool` | `true` | no |

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ resource "aws_rds_cluster" "this" {
9191
}
9292
}
9393

94-
tags = var.tags
94+
tags = merge(var.tags, var.cluster_tags)
9595
}
9696

9797
resource "aws_rds_cluster_instance" "this" {

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,12 @@ variable "tags" {
280280
default = {}
281281
}
282282

283+
variable "cluster_tags" {
284+
description = "A map of tags to add to only the RDS cluster. Used for AWS Instance Scheduler tagging."
285+
type = map(string)
286+
default = {}
287+
}
288+
283289
variable "performance_insights_enabled" {
284290
description = "Specifies whether Performance Insights is enabled or not."
285291
type = bool

0 commit comments

Comments
 (0)