From 05bc0e6e6e4fdc07ec71822202645d05dba8f534 Mon Sep 17 00:00:00 2001 From: Hemslo Wang Date: Tue, 26 Nov 2024 20:24:52 +1100 Subject: [PATCH] fix(password): generate password without special chars (#6) Signed-off-by: Di Wang --- er_aws_rds/rds.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/er_aws_rds/rds.py b/er_aws_rds/rds.py index c380005..91cb135 100644 --- a/er_aws_rds/rds.py +++ b/er_aws_rds/rds.py @@ -110,9 +110,9 @@ def _password(self) -> None: self, id=f"{self.data.identifier}-password", length=20, - # MasterUserPassword Constraints in https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html - override_special="!#$%*()-_=+[]{}<>:?", - min_special=0, # need to be 0 to import current password. It should be improved in next version of module once the instaces are imported. + # avoid special chars for MasterUserPassword Constraints in https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html + # also consistent with terraform-resources random password generation + special=False, min_numeric=0, keepers={"reset_password": self.data.reset_password or ""}, ).result