I wrote this code to add public subnets of VPC to a rdsSecurityGroup.
for publicSubnet in self.vpc.public_subnets:
self.rdsSecurityGroup.add_ingress_rule(peer=publicSubnet,
connection=ec2.Port.tcp(3306))
But I got this error:
jsii.errors.JSIIError: peer.toIngressRuleConfig is not a function
How can I resolve this?