Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ new DatabaseReplica(name: string, args: DatabaseReplicaArgs, opts?: pulumi.Custo
```ts
type DatabaseReplicaArgs = {
replicateSourceDb: pulumi.Input<string>;
dbSubnetGroupName: pulumi.Input<string>;
dbSecurityGroupId: pulumi.Input<string>;
dbSubnetGroupName?: pulumi.Input<string>;
monitoringRole?: aws.iam.Role;
multiAz?: pulumi.Input<boolean>;
applyImmediately?: pulumi.Input<boolean>;
Expand All @@ -421,7 +421,15 @@ type DatabaseReplicaArgs = {
}>;
};
```
Database replica requires primary DB instance to exist.
Database replica requires primary DB instance to exist. If the replica is in the same
region as primary instance, we should not set `dbSubnetGroupNameParam`.
The `replicateSourceDb` param is referenced like this:
```javascript
const primaryDb = new studion.Database(...);
const replica = new studion.DatabaseReplica('replica', {
replicateSourceDb: primaryDb.instance.identifier
});
```

### Redis

Expand Down
2 changes: 1 addition & 1 deletion src/components/database-replica.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export type DatabaseReplicaArgs = {
* * If primary DB is instance of studion:Database, it can be accessed as
* `db.dbSubnetGroup.name`.
*/
dbSubnetGroupName: pulumi.Input<string>;
dbSubnetGroupName?: pulumi.Input<string>;
/**
* DB security group ID. Should be the same as primary instance.
* If primary DB is instance of studion:Database, it can be accessed as
Expand Down