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

(EcsDeployAction): Optionally allow service_name and cluster_name as String #32584

Open
2 tasks
Stretch96 opened this issue Dec 19, 2024 · 2 comments
Open
2 tasks
Assignees
Labels
@aws-cdk/aws-ecr Related to Amazon Elastic Container Registry closing-soon This issue will automatically close in 4 days unless further comments are made. feature-request A feature should be added or improved. p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@Stretch96
Copy link

Stretch96 commented Dec 19, 2024

Describe the feature

Optionally allow service_name and cluster_name as str type for EcsDeployAction

And change service (IBaseService) to optional

Use Case

Creating an ecs.FargateService, which pulls an image from an ecs.Repository within the same Stack will fail, or hang (because there will not be an image in the new ECR)

Example Stack:

  • ECR Repository
  • Fargate Service (Image pulling from the ECR repository)
  • CodePipeline connected to GitHub (Build and Push to ECR and EcsDeployAction to ECS)

The ECR Repository will create fine, but will be empty

The Fargate Service will launch fine (albeit failing to launch a container), and then the cdk/CloudFormation deploy hangs because the ECR is empty

The CodePipeline doesn't get created because the EcsDeployAction Depends on the IBaseService type - even though it only needs the Service Name and Cluster Name, which can be provided as known Strings:
https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-codepipeline-actions/lib/ecs/deploy-action.ts#L114-L115

Proposed Solution

Optionally allow:

service_name(Optional[str]) – The ECS Service Name to deploy
cluster_name(Optional[str]) - The ECS Service Cluster's name

https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_codepipeline_actions/EcsDeployAction.html

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2

Environment details (OS name and version, etc.)

N/A

@Stretch96 Stretch96 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Dec 19, 2024
@github-actions github-actions bot added the @aws-cdk/aws-ecr Related to Amazon Elastic Container Registry label Dec 19, 2024
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Dec 19, 2024
@khushail khushail self-assigned this Dec 19, 2024
@khushail
Copy link
Contributor

@Stretch96 , thanks for reaching out. I see a similar past issue was opened with the same requirements - #17911 and our team provided their insights and workaround here -#17917 (review)

Would request you to go through the shared issue and workaround, and see if that matches with what you are asking for.

Thanks

@khushail khushail added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. p2 and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Dec 20, 2024
Copy link

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecr Related to Amazon Elastic Container Registry closing-soon This issue will automatically close in 4 days unless further comments are made. feature-request A feature should be added or improved. p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants