Skip to content

Commit d59d897

Browse files
authored
Add DB parameterGroupName argument (#18)
This argument allows us to set custom DB parameter group on a DB instance. This is useful in cases when we have to set custom DB params.
1 parent 08b7cde commit d59d897

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ type DatabaseServiceOptions = {
119119
maxAllocatedStorage?: pulumi.Input<number>;
120120
instanceClass?: pulumi.Input<string>;
121121
enableMonitoring?: pulumi.Input<boolean>;
122+
parameterGroupName?: pulumi.Input<string>;
122123
tags?: pulumi.Input<{
123124
[key: string]: pulumi.Input<string>;
124125
}>;
@@ -371,6 +372,7 @@ type DatabaseArgs = {
371372
maxAllocatedStorage?: pulumi.Input<number>;
372373
instanceClass?: pulumi.Input<string>;
373374
enableMonitoring?: pulumi.Input<boolean>;
375+
parameterGroupName?: pulumi.Input<string>;
374376
tags?: pulumi.Input<{
375377
[key: string]: pulumi.Input<string>;
376378
}>;
@@ -413,6 +415,7 @@ type DatabaseReplicaArgs = {
413415
allocatedStorage?: pulumi.Input<number>;
414416
maxAllocatedStorage?: pulumi.Input<number>;
415417
instanceClass?: pulumi.Input<string>;
418+
parameterGroupName?: pulumi.Input<string>;
416419
tags?: pulumi.Input<{
417420
[key: string]: pulumi.Input<string>;
418421
}>;

src/components/database-replica.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ export type DatabaseReplicaArgs = {
4545
* The instance type of the RDS instance. Defaults to 'db.t4g.micro'.
4646
*/
4747
instanceClass?: pulumi.Input<string>;
48+
/**
49+
* The name of custom aws.rds.ParameterGroup. Setting this param will apply custom
50+
* DB parameters to this instance.
51+
*/
52+
parameterGroupName?: pulumi.Input<string>;
4853
/**
4954
* A map of tags to assign to the resource.
5055
*/
@@ -116,6 +121,7 @@ export class DatabaseReplica extends pulumi.ComponentResource {
116121
autoMinorVersionUpgrade: true,
117122
maintenanceWindow: 'Mon:07:00-Mon:07:30',
118123
replicateSourceDb: argsWithDefaults.replicateSourceDb,
124+
parameterGroupName: argsWithDefaults.parameterGroupName,
119125
...monitoringOptions,
120126
tags: { ...commonTags, ...argsWithDefaults.tags },
121127
},

src/components/database.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ export type DatabaseArgs = {
5454
* Set this to true to enable database monitoring. Defaults to false.
5555
*/
5656
enableMonitoring?: pulumi.Input<boolean>;
57+
/**
58+
* The name of custom aws.rds.ParameterGroup. Setting this param will apply custom
59+
* DB parameters to this instance.
60+
*/
61+
parameterGroupName?: pulumi.Input<string>;
5762
/**
5863
* A map of tags to assign to the resource.
5964
*/
@@ -230,6 +235,7 @@ export class Database extends pulumi.ComponentResource {
230235
finalSnapshotIdentifier: `${this.name}-final-snapshot-${stack}`,
231236
backupWindow: '06:00-06:30',
232237
backupRetentionPeriod: 14,
238+
parameterGroupName: argsWithDefaults.parameterGroupName,
233239
...monitoringOptions,
234240
tags: { ...commonTags, ...argsWithDefaults.tags },
235241
},

0 commit comments

Comments
 (0)