You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -339,6 +362,37 @@ const project = new studion.Project('demo-project', {
339
362
});
340
363
```
341
364
365
+
### Persistent Storage Configuration
366
+
367
+
Services that require persistent storage (e.g. `ECS`, `Mongo`) can be configured with multiple EFS volumes and mount points.
368
+
Currently, only one access point is configured, with root directory set to `/data`.
369
+
The configuration consists of two main parts:
370
+
371
+
1.`volumes`: Define the EFS volumes to be created
372
+
2.`mountPoints`: Specify where these volumes should be mounted in the container
373
+
374
+
Example configuration:
375
+
376
+
```ts
377
+
persistentStorageConfig: {
378
+
volumes: [
379
+
{ name: 'data-volume' },
380
+
{ name: 'config-volume' }
381
+
],
382
+
mountPoints: [
383
+
{
384
+
sourceVolume: 'data-volume',
385
+
containerPath: '/data',
386
+
},
387
+
{
388
+
sourceVolume: 'config-volume',
389
+
containerPath: '/config',
390
+
readOnly: true
391
+
}
392
+
]
393
+
}
394
+
```
395
+
342
396
### Database
343
397
344
398
AWS RDS Postgres instance.
@@ -559,6 +613,14 @@ export type WebServerArgs = {
559
613
environment?:aws.ecs.KeyValuePair[];
560
614
secrets?:aws.ecs.Secret[];
561
615
healthCheckPath?:pulumi.Input<string>;
616
+
persistentStorageConfig?:pulumi.Input<{
617
+
volumes: { name:string }[];
618
+
mountPoints: {
619
+
sourceVolume:string;
620
+
containerPath:string;
621
+
readOnly?:boolean;
622
+
}[];
623
+
}>;
562
624
taskExecutionRoleInlinePolicies?:pulumi.Input<
563
625
pulumi.Input<RoleInlinePolicy>[]
564
626
>;
@@ -655,6 +717,14 @@ export type MongoArgs = {
655
717
password?:pulumi.Input<string>;
656
718
port?:pulumi.Input<number>;
657
719
size?:pulumi.Input<Size>;
720
+
persistentStorageConfig?:pulumi.Input<{
721
+
volumes: { name:string }[];
722
+
mountPoints: {
723
+
sourceVolume:string;
724
+
containerPath:string;
725
+
readOnly?:boolean;
726
+
}[];
727
+
}>;
658
728
tags?:pulumi.Input<{
659
729
[key:string]:pulumi.Input<string>;
660
730
}>;
@@ -665,6 +735,8 @@ If the password is not specified it will be autogenerated.
665
735
The Mongo password is stored as a secret inside AWS Secret Manager.
666
736
The secret will be available on the `Mongo` resource as `password.secret`.
667
737
738
+
The Mongo component comes with a default persistent storage configuration that mounts an EFS volume `mongo` to `/data/db`. You can override this by providing your own `persistentStorageConfig`.
739
+
668
740
### Ecs Service
669
741
670
742
AWS ECS Fargate.
@@ -708,7 +780,14 @@ export type EcsServiceArgs = {
0 commit comments