ActionIQ / terraform-aws-retool-ecs-fargate

Terraform module for deploying Retool on-premise
https://registry.terraform.io/modules/ActionIQ/retool-ecs-fargate
MIT License
1 stars 1 forks source link

module.retool-self-hosted.aws_rds_cluster.retool_postgresql allows invalid passwords to be generated #4

Closed OldCrowEW closed 2 years ago

OldCrowEW commented 2 years ago

The TODO here https://github.com/ActionIQ/terraform-aws-retool-ecs-fargate/blob/main/main.tf#L198 is causing invalid passwords to be created, resulting in RDS Cluster creation to fail:

│ Error: error creating RDS cluster: InvalidParameterValue: The parameter MasterUserPassword is not a valid password. Only printable ASCII characters besides '/', '@', '"', ' ' may be used.
│   status code: 400, request id: 4a05328d-04a8-4665-be68-11ff9f2bdb62
│
│   with module.retool-self-hosted.aws_rds_cluster.retool_postgresql,
│   on .terraform/modules/retool-self-hosted/main.tf line 214, in resource "aws_rds_cluster" "retool_postgresql":
│  214: resource "aws_rds_cluster" "retool_postgresql" {

Expected behavior:

Workaround:

$ terraform taint module.retool-self-hosted.aws_secretsmanager_secret.retool_rds_secret
$ terraform apply
OldCrowEW commented 2 years ago

Potential solution: https://gist.github.com/smiller171/6be734957e30c5d4e4b15422634f13f4#file-database-tf

Gist
Manage RDS password in Terraform in a sane way
Manage RDS password in Terraform in a sane way. GitHub Gist: instantly share code, notes, and snippets.