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

fix(ecs): cannot separate Cluster and Ec2Service behind ALB #5813

Merged
merged 2 commits into from
Jan 15, 2020

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Jan 15, 2020

In the case of an ECS Service runningon EC2 capacity, pointing a Load
Balancer to the Service involves updating the SecurityGroups of the
capacity associated to the Cluster (to allow traffic from the Load
Balancer).

If these resources are in different stacks, this is liable to create
cyclic references: Service points to Cluster, Security Groups point
to Load Balancer, cyclic references arise from the way these resources
are typically colocated.

This changes makes it so the ingress/egress rules will be created in
the same stack as the Service (which points to both Cluster and LB),
hence making sure there are no cycles.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

In the case of an ECS Service runningon  EC2 capacity, pointing a Load
Balancer to the Service involves updating the SecurityGroups of the
capacity associated to the Cluster (to allow traffic from the Load
Balancer).

If these resources are in different stacks, this is liable to create
cyclic references: Service points to Cluster, Security Groups point
to Load Balancer, cyclic references arise from the way these resources
are typically colocated.

This changes makes it so the ingress/egress rules will be created in
the same stack as the Service (which points to both Cluster and LB),
hence making sure there are no cycles.
@rix0rrr rix0rrr force-pushed the huijbers/x-stack-cluster branch from 89dc087 to c43d43f Compare January 15, 2020 16:52
@rix0rrr rix0rrr changed the title Huijbers/x stack cluster fix(ecs): cannot separate Cluster and Ec2Service behind ALB Jan 15, 2020
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 15, 2020
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Jan 15, 2020

Thank you for contributing! Your pull request is now being automatically merged.

@mergify
Copy link
Contributor

mergify bot commented Jan 15, 2020

Thank you for contributing! Your pull request is now being automatically merged.

@mergify mergify bot merged commit eb3c517 into master Jan 15, 2020
@mergify mergify bot deleted the huijbers/x-stack-cluster branch January 15, 2020 19:06
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@TrueBrain
Copy link

Sadly this broke my deployment. And as there is no way to revert to the old behaviour (from what I can tell), I am not sure what to do :D Created a bug report to explain my use-case. Hopefully you can give it a look? Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants