r/devops • • Sep 10 '26

Architecture How do you provision RDS & DocumentDB users cleanly? Dual Terraform + Pulumi setup feels redundant.

Hi everyone, looking for a sanity check and some advice on DB user management.

Context & Current Setup:
Team: ~10 developers.
Infra: Everything is provisioned with Terraform.

The Catch: Pulumi is used exclusively to connect through a bastion host to create users in RDS (Postgres) and DocumentDB (MongoDB-compatible).

Current Task & Constraints:
I need to integrate AWS Secrets Manager to store and distribute DB passwords so developers can retrieve them securely via IAM policies.

Constraint: IAM DB Authentication is off the table per my mentor's requirement—we must use Secrets Manager or an external password manager.

The Issue:
Maintaining two state stores (Terraform + Pulumi) just to manage database users feels redundant and adds unnecessary friction. I'd love to pitch an alternative that lets us drop Pulumi completely.

Questions:

  1. How do you handle RDS / DocumentDB user and credential management in your projects?
  2. What is the cleanest pattern to handle this without running dual IaC tools?

Open to any feedback or critique!

15 Upvotes

35 comments sorted by

View all comments

2

u/No_Bee_4979 Sep 11 '26

I did this with 2 modules for RDS (Postgres). One is called dev/rds, and one is called dev/postgres. The Postgres module reads the secrets and creates the users.

Next time I do it i'll make it one module.

1

u/Witty_Philosopher284 Sep 11 '26

How do you handle network connectivity for the ⁠dev/postgres⁠ dev/rds module? Are you running Terraform inside the private VPC? Or how does it work?

1

u/No_Bee_4979 Sep 11 '26

That is correct; RDS is in a private VPC. I handle that by using the AWS Client VPN (OpenVPN) to connect to the private VPC and be able to connect to RDS.

1

u/[deleted] Sep 11 '26

[removed] — view removed comment

1

u/No_Bee_4979 Sep 11 '26

Oh, I store those in AWS Secrets Manager, set as sensitive so they never leak in the plan.