https://pulumi.com logo
#getting-started
Title
# getting-started
s

swift-architect-6677

06/16/2023, 1:41 AM
Hi guys. Ok. So I’ve created my RDS database with pulumi using this:
Copy code
// Create an RDS instance using PostgreSQL
const postgresRdsInstance = new aws.rds.Instance("braindripdb", {
  engine: "postgres",
  engineVersion: "15.3",
  instanceClass: "db.t3.micro",
  allocatedStorage: 20,
  name: "braindripdb",
  username: "pgdbuser",
  password: "pgdbuser123",
  vpcSecurityGroupIds: [rdsSecurityGroup.id],
  publiclyAccessible: true,
  skipFinalSnapshot: true,
  applyImmediately: true,
});

// Export the RDS instance's endpoint
export const rdsInstanceEndpoint = postgresRdsInstance.endpoint;
But I’m thinking I’ve just put my username and pwd in my index.ts file which goes into my github for all to see. Surely, there’s a better way that does not involve me putting my DB username and password in plain text? How do you guys do it?
b

brainy-church-78120

06/16/2023, 2:05 AM
s

swift-architect-6677

06/16/2023, 2:07 AM
Cool thx! Just what I needed. Thank you.
75 Views