swift-architect-6677
06/16/2023, 1:41 AM// 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?brainy-church-78120
06/16/2023, 2:05 AMswift-architect-6677
06/16/2023, 2:07 AM