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

(ecs_patterns): Ability to set entrypoint and command within ApplicationLoadBalancedFargateServiceProps #17092

Closed
2 tasks
danw-mpl opened this issue Oct 21, 2021 · 3 comments · Fixed by #22609
Closed
2 tasks
Labels
@aws-cdk/aws-ecs-patterns Related to ecs-patterns library effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@danw-mpl
Copy link

Description

I'd like to set the entrypoint and command with ApplicationLoadBalancedFargateServiceProps .

Use Case

To avoid having to do this:

const cfnTaskDef = fargateService.taskDefinition.node.defaultChild as ecs.CfnTaskDefinition;
cfnTaskDef.addOverride('Properties.ContainerDefinitions.0.EntryPoint', ['/custom_entrypoint.sh'])

Proposed Solution

Expose entrypoint and command on ApplicationLoadBalancedFargateServiceProps .

const fargateService = new ecs_patterns.ApplicationLoadBalancedFargateService(this, 'FargateService', {
    entrypoint: ["my_entrypoint.sh"],
    command: ["command"]
}

Other information

No response

Acknowledge

  • I may be able to implement this feature request
  • This feature might incur a breaking change
@danw-mpl danw-mpl added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Oct 21, 2021
@github-actions github-actions bot added the @aws-cdk/aws-ecs-patterns Related to ecs-patterns library label Oct 21, 2021
@ryparker ryparker added effort/small Small work item – less than a day of effort p2 and removed needs-triage This issue or PR still needs to be triaged. labels Oct 21, 2021
@ryparker
Copy link
Contributor

Hey @danw-mpl 👋🏻

Thanks for opening this feature request. I understand that using escape hatches is not ideal.

I'm labeling this as p2 which means that we are unable to work on this immediately. We use +1s to help us prioritize our work, and as always we are happy to take contributions if anyone is interested to pick this up and submit a PR (please make sure to follow our contribution guidelines.)
🙏

@madeline-k madeline-k removed their assignment Nov 24, 2021
@joshualang
Copy link

+1

@mergify mergify bot closed this as completed in #22609 Oct 28, 2022
mergify bot pushed a commit that referenced this issue Oct 28, 2022
…tionLoadBalancedFargateService and ApplicationLoadBalancedEc2Service (#22609)

Allow `entryPoint` and `command` to be configured via `taskImageOptions` prop in `ApplicationLoadBalancedFargateService` and `ApplicationLoadBalancedEc2Service`

example:

```ts
const loadBalancedFargateService = new ecsPatterns.ApplicationLoadBalancedFargateService(this, 'Service', {
  cluster,
  memoryLimitMiB: 1024,
  cpu: 512,
  taskImageOptions: {
    image: ecs.ContainerImage.fromRegistry("amazon/amazon-ecs-sample"),
    command: ["command"],
    entryPoint: ["entry", "point"],
  },
});
```

Closes #17092

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecs-patterns Related to ecs-patterns library effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
4 participants