Skip to content

Commit

Permalink
[tf][indexer] option for performance insights and params ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
rustielin authored and gregnazario committed Aug 16, 2022
1 parent c616db2 commit 1ab752d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
25 changes: 16 additions & 9 deletions terraform/modules/indexer/rds.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ resource "aws_db_parameter_group" "indexer" {
name = "log_connections"
value = "1"
}

lifecycle {
ignore_changes = [
parameter
]
}
}


Expand All @@ -38,15 +44,16 @@ resource "aws_db_instance" "indexer" {
allocated_storage = var.db_allocated_storage
max_allocated_storage = var.db_max_allocated_storage

engine = var.db_engine
engine_version = var.db_engine_version
username = "indexer"
password = var.db_password
db_subnet_group_name = aws_db_subnet_group.indexer.name
vpc_security_group_ids = [aws_security_group.indexer.id]
parameter_group_name = aws_db_parameter_group.indexer.name
publicly_accessible = var.db_publicly_accessible
skip_final_snapshot = true
engine = var.db_engine
engine_version = var.db_engine_version
username = "indexer"
password = var.db_password
db_subnet_group_name = aws_db_subnet_group.indexer.name
vpc_security_group_ids = [aws_security_group.indexer.id]
parameter_group_name = aws_db_parameter_group.indexer.name
publicly_accessible = var.db_publicly_accessible
skip_final_snapshot = true
performance_insights_enabled = var.performance_insights_enabled
}

resource "kubernetes_secret" "indexer_credentials" {
Expand Down
5 changes: 5 additions & 0 deletions terraform/modules/indexer/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,8 @@ variable "db_publicly_accessible" {
default = false
description = "Determines if RDS instance is publicly accessible"
}

variable "performance_insights_enabled" {
default = false
description = "Determines if performance insights are enabled for the RDS DB"
}

0 comments on commit 1ab752d

Please sign in to comment.