v0.30.2
🚀 Enhancements
fix: adjust logic to address `manage_master_user_password` variable bugs @RoseSecurity (#131)
## what and why- This PR fixes critical bugs created when the
manage_master_user_passwordvariable was introduced. The first bug caused a Terraform error where themaster_passwordoutput attempted to join anullvalue when AWS was managing the password, failing with "Invalid function argument: cannot concatenate null values." - These fixes ensure that when
manage_master_user_password = null(default), random passwords are created and stored in SSM as expected, and whenmanage_master_user_password = true, AWS manages the password without attempting to expose it in Terraform outputs or store it in SSM, maintaining both backward compatibility and the intended security
bug
│ Error: Invalid function argument
│
│ on .terraform/modules/documentdb/outputs.tf line 7, in output "master_password":
│ 7: value = var.manage_master_user_password != null ? join("", aws_docdb_cluster.default[*].master_password) : null
│ ├────────────────
│ │ while calling join(separator, lists...)
│ │ aws_docdb_cluster.default is tuple with 1 element
│
│ Invalid value for "lists" parameter: element 0 is null; cannot concatenate null values.references
🐛 Bug Fixes
fix: adjust logic to address `manage_master_user_password` variable bugs @RoseSecurity (#131)
## what and why- This PR fixes critical bugs created when the
manage_master_user_passwordvariable was introduced. The first bug caused a Terraform error where themaster_passwordoutput attempted to join anullvalue when AWS was managing the password, failing with "Invalid function argument: cannot concatenate null values." - These fixes ensure that when
manage_master_user_password = null(default), random passwords are created and stored in SSM as expected, and whenmanage_master_user_password = true, AWS manages the password without attempting to expose it in Terraform outputs or store it in SSM, maintaining both backward compatibility and the intended security
bug
│ Error: Invalid function argument
│
│ on .terraform/modules/documentdb/outputs.tf line 7, in output "master_password":
│ 7: value = var.manage_master_user_password != null ? join("", aws_docdb_cluster.default[*].master_password) : null
│ ├────────────────
│ │ while calling join(separator, lists...)
│ │ aws_docdb_cluster.default is tuple with 1 element
│
│ Invalid value for "lists" parameter: element 0 is null; cannot concatenate null values.