feat: add restricted ingress rule for pgweb on port 9001 and clean up whitespace in database secret configuration

This commit is contained in:
vickytechkey 2026-08-18 09:32:28 +05:30
parent 3713bcdee2
commit b8943f4ead

View file

@ -50,6 +50,9 @@ export class AwsCdkStack extends cdk.Stack {
securityGroup.addIngressRule(ec2.Peer.anyIpv4(), ec2.Port.tcp(5050), 'Allow pgAdmin 4 Web UI IPv4');
securityGroup.addIngressRule(ec2.Peer.anyIpv6(), ec2.Port.tcp(5050), 'Allow pgAdmin 4 Web UI IPv6');
// pgweb Web UI - Restricted to specific IP
securityGroup.addIngressRule(ec2.Peer.ipv4('16.113.57.127/32'), ec2.Port.tcp(9001), 'Allow pgweb Web UI access');
// PostgreSQL Database - Open to public
securityGroup.addIngressRule(ec2.Peer.anyIpv4(), ec2.Port.tcp(5432), 'Allow PostgreSQL Database IPv4');
securityGroup.addIngressRule(ec2.Peer.anyIpv6(), ec2.Port.tcp(5432), 'Allow PostgreSQL Database IPv6');
@ -78,9 +81,9 @@ export class AwsCdkStack extends cdk.Stack {
description: 'Database credentials for the Seller Central application',
secretObjectValue: {
username: cdk.SecretValue.unsafePlainText('vignesh'),
host: cdk.SecretValue.unsafePlainText('127.0.0.1'),
host: cdk.SecretValue.unsafePlainText('127.0.0.1'),
password: cdk.SecretValue.unsafePlainText('vtechnosoft@123A'),
dbname: cdk.SecretValue.unsafePlainText('sellerprofile'),
dbname: cdk.SecretValue.unsafePlainText('sellerprofile'),
},
});