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

Unable to connect to database if it is destroyed and recreated #64

Open
bendavies opened this issue Oct 15, 2024 · 3 comments
Open

Unable to connect to database if it is destroyed and recreated #64

bendavies opened this issue Oct 15, 2024 · 3 comments

Comments

@bendavies
Copy link

bendavies commented Oct 15, 2024

Hi,

Using these steps, it is no longer possible to connect to an rds database

  1. connect to rds with 7777, disconnect,
  2. destroy rds instance
  3. recreate rds instance (ensure same name)
  4. try to connect to rds with 7777.

Step 4 will fail.

I tracked this down to the 7777 security group not being added to the rds instance security group in step 4, since 7777 already thinks it has done so.

Thanks,
Ben

@deleugpn
Copy link
Collaborator

For this particular situation you might need to uninstall it 7777 uninstall and then try to connect again. This will delete the 7777 stack from your AWS Account, allowing it to redeploy correctly and properly assign the Security Group to your RDS.

The limitation here is that CloudFormation keeps track of resources via Resource Key Name and since your RDS is named exactly the same, 7777 is unable to understand that the Security Group we have attached to your RDS is no longer valid

@bendavies
Copy link
Author

bendavies commented Oct 15, 2024

yes thanks, I did work out that i needed to uninstall.

When 7777 stops the container, the users IP is removed from the 7777 security group.
Could the 7777 security group be removed from the RDS security group at this point, as well?

@mnapoli
Copy link
Member

mnapoli commented Oct 19, 2024

We try to remove as little as possible to keep the process light and fast. Destroying and recreating databases is definitely a valid use case, not one that we've seen a lot/not common so we haven't optimized for it unfortunately.

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