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

include target group and load balancer at service creation? #15

Open
blysik opened this issue Mar 16, 2021 · 3 comments
Open

include target group and load balancer at service creation? #15

blysik opened this issue Mar 16, 2021 · 3 comments

Comments

@blysik
Copy link

blysik commented Mar 16, 2021

Hi! It looks like if you want to use an application load balancer for a fargate service, it needs to be created when you create the service.

After you create a service, the target group ARN or load balancer name, container name, and container port specified in the service definition are immutable. You cannot add, remove, or change the load balancer configuration of an existing service. If you update the task definition for the service, the container name and container port that were specified when the service was created must remain in the task definition.

Should this be added in some way? Thanks!

@UnKn0wN-Binary
Copy link

Hi @blysik We're working on getting this added right now as an option for you to specify when building out.

@blysik
Copy link
Author

blysik commented Mar 18, 2021

Awesome! You all are great. I'll hang tight and wait for it. Bonus points if there's a process to follow from getting to where we are now (no load balancer), to destroying/re-creating with an ALB without losing out data. :)

@rileydakota
Copy link
Owner

rileydakota commented Mar 18, 2021

@blysik we will add that in - the nice thing about the CDK L2 constructs for things that store data is they typically add a DeletionPolicy that will not delete said resource when the stack is deleted. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html for more info on that. It can easily be done by replacing our code for creating a FileSystem

const serverFileSystem = new efs.FileSystem(this, "valheimServerStorage", {
with something like:

const serverFileSystem = new efs.FileSystem.fromFileSystemAttributes(this, "valheimServerStorage", {
      fileSystemId: 'YOUR_EXISTING_FILESYSTEM_ID,
      securityGroup: fsSecurityGroup,  // will need rewire a few things for this part
    });

We will ideally add some logic to grab this stuff for you if an old template created it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants