如何使用CDK将ECS私网IP接入RDS安全组?
我需要ApplicationLoadBalancedFargateService(CDK代码)的私有IP。
我尝试了以下方法(未能解决):
const auroraSecurityGroup = new ec2.SecurityGroup(this, 'security-group', {
vpc,
allowAllOutbound: true,
description: 'Security Group of Aurora PostgreSQL',
securityGroupName: AURORA_SECURITY_GROUP_NAME
});
auroraSecurityGroup.addIngressRule(ec2.Peer.ipv4('my ecs private ip'), ec2.Port.tcp(DB_PORT), 'describe');
Run Code Online (Sandbox Code Playgroud)