Skip to content

Commit

Permalink
adding read replica (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
kammerdiener authored Jun 29, 2023
1 parent 1753fbc commit 95f94d9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions infra/prod/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@ const postgresql = new aws.rds.Instance(
{ protect: true }
);

const readOnlyReplica = new aws.rds.ReadReplica(
`scorer-db-read-replica`,
{
sourceDbInstanceIdentifier: postgresql.id,
instanceClass: "db.t3.medium",
dbSubnetGroupName: dbSubnetGroup.id,
vpcSecurityGroupIds: [db_secgrp.id],
},
{ dependsOn: [postgresql] }
);

export const rdsEndpoint = postgresql.endpoint;
export const rdsArn = postgresql.arn;
export const rdsConnectionUrl = pulumi.secret(
Expand Down

0 comments on commit 95f94d9

Please sign in to comment.