diff --git a/platform/src/components/aws/cluster.ts b/platform/src/components/aws/cluster.ts index bb0d25851..23da5da64 100644 --- a/platform/src/components/aws/cluster.ts +++ b/platform/src/components/aws/cluster.ts @@ -979,6 +979,31 @@ export interface ClusterServiceArgs { */ directory?: Input; }; + /** + * The mount points for the data volumes in your container. + * This parameter maps to Volumes in the creat-container Docker API and the `--volume` + * option to docker run. + * + * Windows containers can mount whole directories on the same drive as `$env:ProgramData`. + * Windows containers cannot mount directories on a different drive, and mount points + * cannot be used across drives. You must specify mount points to attach an Amazon EBS + * volume directly to an Amazon ECS task. + */ + mountPoints?: { + /** + * The name of the volume to mount. + */ + sourceVolume: Input; + + /** + * The path in the container where the volume will be mounted. + */ + containerPath: Input; + /** + * If this value is true, the container has read-only access to the volume. If this value is false, then the container can write to the volume. The default value is false. + */ + readOnly?: Input; + }[]; }>[]; /** * Assigns the given IAM role name to the containers running in the service. This allows you to pass in a previously created role. diff --git a/platform/src/components/aws/service.ts b/platform/src/components/aws/service.ts index ea7ff48fb..062752626 100644 --- a/platform/src/components/aws/service.ts +++ b/platform/src/components/aws/service.ts @@ -254,6 +254,7 @@ export class Service extends Component implements Link.Linkable { command: args.command, entrypoint: args.entrypoint, dev: args.dev, + mountPoints: args.mountPoints, }, ]; @@ -634,6 +635,7 @@ export class Service extends Component implements Link.Linkable { linuxParameters: { initProcessEnabled: true, }, + mountPoints: container.mountPoints, }; function createImage() {