helpful-mechanic-48919
08/07/2024, 1:12 AMpulumi up
again, the bucket notification error was disappeared but I got an another error A duplicate Security Group rule was found
. I investigated the deployment and seems it is related to load balancer security group.
Would love to get some assistance on this.little-cartoon-10569
08/07/2024, 1:24 AMhelpful-mechanic-48919
08/07/2024, 1:26 AMlittle-cartoon-10569
08/07/2024, 1:26 AMhelpful-mechanic-48919
08/07/2024, 1:27 AMhelpful-mechanic-48919
08/07/2024, 1:27 AMhelpful-mechanic-48919
08/07/2024, 1:28 AMlittle-cartoon-10569
08/07/2024, 1:29 AMhelpful-mechanic-48919
08/07/2024, 1:30 AMaws:ec2:SecurityGroupRule (api-xxxx-external-0-ingress):
error: 1 error occurred:
* [WARN] A duplicate Security Group rule was found on (sg-xxxxx). This may be
a side effect of a now-fixed Terraform issue causing two security groups with
identical attributes but different source_security_group_ids to overwrite each
other in the state. See <https://github.com/hashicorp/terraform/pull/2376> for more
information and instructions for recovery. Error: InvalidPermission.Duplicate: the specified rule "peer: 0.0.0.0/0, TCP, from port: 80, to port: 80, ALLOW" already exists
status code: 400, request id: b3973b4a-368c-4ac8-ab83-06536c1b5655
helpful-mechanic-48919
08/07/2024, 1:32 AMhelpful-mechanic-48919
08/07/2024, 1:34 AMlittle-cartoon-10569
08/07/2024, 1:41 AMlittle-cartoon-10569
08/07/2024, 1:43 AMlittle-cartoon-10569
08/07/2024, 1:43 AMpulumi up
, then uncomment them and pulumi up
again.helpful-mechanic-48919
08/07/2024, 1:44 AMlittle-cartoon-10569
08/07/2024, 1:57 AMlittle-cartoon-10569
08/07/2024, 2:00 AMdefaultSecurityGroup: false
to delete them.helpful-mechanic-48919
08/07/2024, 2:02 AMconst vpc = new awsx.ec2.Vpc(`${vpcName}`, {
tags: { Name: ${vpcName} },
numberOfNatGateways: 1,
});
const cluster = new awsx.ecs.Cluster(`${clusterName}`, {
vpc,
});
const listener = new awsx.lb.ApplicationLoadBalancer(
`alb`,
{
vpc,
external: true,
securityGroups: cluster.securityGroups,
}
)
.createTargetGroup("target", {
port: 3001,
protocol: "HTTP",
healthCheck: {
path: "/healthCheck",
},
})
.createListener("server", { port: 80, external: true });
little-cartoon-10569
08/07/2024, 2:02 AMlittle-cartoon-10569
08/07/2024, 2:04 AMsecurityGroups
. So the problem is in the cluster code.helpful-mechanic-48919
08/07/2024, 2:05 AMlittle-cartoon-10569
08/07/2024, 2:06 AMif (!lbArgs.securityGroups && !defaultSecurityGroup?.skip) {
. And since lbArgs.securityGroups
is truthy, then the rules aren't being created.
You have problems with security group rules, but it looks like it's not these two security group rules.little-cartoon-10569
08/07/2024, 2:07 AMlittle-cartoon-10569
08/07/2024, 2:07 AMlittle-cartoon-10569
08/07/2024, 2:09 AMhelpful-mechanic-48919
08/07/2024, 2:09 AMlittle-cartoon-10569
08/07/2024, 2:11 AMlittle-cartoon-10569
08/07/2024, 2:12 AMhelpful-mechanic-48919
08/07/2024, 2:13 AMlittle-cartoon-10569
08/07/2024, 2:14 AMlittle-cartoon-10569
08/07/2024, 2:15 AMlittle-cartoon-10569
08/07/2024, 2:15 AMhelpful-mechanic-48919
08/07/2024, 2:16 AM