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(rds): restrict RDS inbound access by removing open IP rule #81

Merged
merged 1 commit into from
Feb 18, 2024

Conversation

nitesh-balla
Copy link
Contributor

No description provided.

@@ -295,6 +295,8 @@ while true; do

done

export AWS_DEFAULT_REGION;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this required?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In few cases if AWS_DEFAULT_REGION is not exported by the user. CDK is not populating CDK_DEFAULT_REGION. So, just to ignore the case where the user didn't export AWS_DEFAULT_REGION I am doing it in the script.


let rds = new DataBaseConstruct(this, config.rds, vpc.vpc, isStandalone);
if (isStandalone) {
rds.sg.addIngressRule(ec2.Peer.ipv4("0.0.0.0/0"), ec2.Port.tcp(5432)); // this has to be moved to standalone and for production it should be internal jump
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to remove in other places also right?

Copy link
Contributor Author

@nitesh-balla nitesh-balla Feb 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this PR is RDS Specific, Removing here would suffice. I have created a separate issue for restricting external jump and internal jump public access.

@nitesh-balla nitesh-balla merged commit 7354340 into main Feb 18, 2024
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

Successfully merging this pull request may close these issues.

2 participants