v0.30.1
·
6 commits
to main
since this release
Managed Admin Password for DocumentDb @Benbentwo (#124)
refactor: improve master password management logic and validation in DocumentDB clusterwhat
- Updated
create_passwordlocal to check for null - Enforced
manage_master_user_passwordto be true or null (required by resource)- moved variable up closer to
master_password
- moved variable up closer to
This pull request refines the handling of the master_password and manage_master_user_password variables within the Terraform module for AWS DocumentDB clusters. It introduces better logic for password management, adds validation for the new variable, and updates the module configuration accordingly.
Password Management Updates:
main.tf: Updated the logic forcreate_passwordto account for cases where bothvar.master_passwordandvar.manage_master_user_passwordare null. This ensures a random password is created when necessary. Additionally, simplified the handling ofmaster_passwordandmanage_master_user_passwordin theaws_docdb_clusterresource configuration. [1] [2]
Variable Refinements:
variables.tf: Added a newmanage_master_user_passwordvariable with validation to ensure it is eithertrueornull. This replaces the previous implementation and provides clearer control over managing the master user password via AWS Secrets Manager.variables.tf: Removed the old definition ofmanage_master_user_passwordto avoid redundancy and potential conflicts.