Skip to content

Commit 98e3cea

Browse files
authored
feat: Additional tags for security group (#205)
1 parent 4698e4a commit 98e3cea

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
@@ -184,6 +184,7 @@ No Modules.
184184
| s3\_import | Configuration map used to restore from a Percona Xtrabackup in S3 (only MySQL is supported) | `map(string)` | `null` | no |
185185
| scaling\_configuration | Map of nested attributes with scaling properties. Only valid when engine\_mode is set to `serverless` | `map(string)` | `{}` | no |
186186
| security\_group\_description | The description of the security group. If value is set to empty string it will contain cluster name in the description | `string` | `"Managed by Terraform"` | no |
187+
| security\_group\_tags | Additional tags for the security group | `map(string)` | `{}` | no |
187188
| skip\_final\_snapshot | Should a final snapshot be created on cluster destroy | `bool` | `false` | no |
188189
| snapshot\_identifier | DB snapshot to create this database from | `string` | `null` | no |
189190
| source\_region | The source region for an encrypted replica DB cluster | `string` | `""` | no |

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ resource "aws_security_group" "this" {
230230

231231
description = var.security_group_description == "" ? "Control traffic to/from RDS Aurora ${var.name}" : var.security_group_description
232232

233-
tags = merge(var.tags, {
233+
tags = merge(var.tags, var.security_group_tags, {
234234
Name = local.name
235235
})
236236
}

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,12 @@ variable "cluster_tags" {
268268
default = {}
269269
}
270270

271+
variable "security_group_tags" {
272+
description = "Additional tags for the security group"
273+
type = map(string)
274+
default = {}
275+
}
276+
271277
variable "performance_insights_enabled" {
272278
description = "Specifies whether Performance Insights is enabled or not"
273279
type = bool

0 commit comments

Comments
 (0)