Skip to content

Commit

Permalink
read replica support in external vuln scan module (#19166)
Browse files Browse the repository at this point in the history
closes #18926
  • Loading branch information
edwardsb authored May 21, 2024
1 parent a0ef331 commit 642f2a9
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion terraform/addons/external-vuln-scans/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ locals {
]
secrets = [
for k, v in merge(var.fleet_config.extra_secrets, {
FLEET_MYSQL_PASSWORD = var.fleet_config.database.password_secret_arn
FLEET_MYSQL_PASSWORD = var.fleet_config.database.password_secret_arn
FLEET_MYSQL_READ_REPLICA_PASSWORD = var.fleet_config.database.password_secret_arn
}) : {
name = k
valueFrom = v
Expand Down Expand Up @@ -83,6 +84,18 @@ resource "aws_ecs_task_definition" "vuln-processing" {
name = "FLEET_MYSQL_ADDRESS"
value = var.fleet_config.database.address
},
{
name = "FLEET_MYSQL_READ_REPLICA_USERNAME"
value = var.fleet_config.database.user
},
{
name = "FLEET_MYSQL_READ_REPLICA_DATABASE"
value = var.fleet_config.database.database
},
{
name = "FLEET_MYSQL_READ_REPLICA_ADDRESS"
value = var.fleet_config.database.rr_address == null ? var.fleet_config.database.address : var.fleet_config.database.rr_address
},
{
name = "FLEET_REDIS_ADDRESS"
value = var.fleet_config.redis.address
Expand Down

0 comments on commit 642f2a9

Please sign in to comment.