CDK Fargate deploy adds unwanted SG rules

0

I'm setting up a Fargate cluster with AWS CDK v2. On deploy, CDK is adding a "0.0.0.0/0 Allow from anyone on port 80" rule to a pre-made security group. Any idea how to stop this behavior? Here is my service stanza:

const service = new ecs.FargateService(this, "SBfargate", {
  cluster,
  desiredCount: 1,
  taskDefinition: fargateTaskDefinition,
  assignPublicIp: true,
  securityGroups: [sbsg],
  serviceName: 'SB-Fargate_service',
});
sbecker
已提問 2 年前檢視次數 252 次
1 個回答
1

Found https://github.com/aws/aws-cdk/issues/3177 after more digging. Mutable: false on the SG stanza worked as I wanted.

sbecker
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南