Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mountPoints to Service #1240

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
25 changes: 25 additions & 0 deletions platform/src/components/aws/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,31 @@ export interface ClusterServiceArgs {
*/
directory?: Input<string>;
};
/**
* 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<string>;

/**
* The path in the container where the volume will be mounted.
*/
containerPath: Input<string>;
/**
* 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<boolean>;
}[];
Comment on lines +982 to +1006
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should I copy this block to top-level ServiceArgs?

}>[];
/**
* Assigns the given IAM role name to the containers running in the service. This allows you to pass in a previously created role.
Expand Down
2 changes: 2 additions & 0 deletions platform/src/components/aws/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ export class Service extends Component implements Link.Linkable {
command: args.command,
entrypoint: args.entrypoint,
dev: args.dev,
mountPoints: args.mountPoints,
},
];

Expand Down Expand Up @@ -634,6 +635,7 @@ export class Service extends Component implements Link.Linkable {
linuxParameters: {
initProcessEnabled: true,
},
mountPoints: container.mountPoints,
};

function createImage() {
Expand Down