【发布时间】:2021-06-11 05:06:27
【问题描述】:
我有一个设置:ECS 前面的 ALB。我有一个 ecs 模块和一个用于 alb:
alb_sg的ALB的出口规则:
egress {
description = "Traffic from ALB to ECS"
from_port = 80
to_port = 80
protocol = "tcp"
security_groups = [var.ecs_sg] //comes from output from ecs stack
}
现在在 ECS 中,我的安全组 (ecs_sg) 有类似的东西
ingress {
description = "Allow ALB to ECS"
from_port = 80
to_port = 80
protocol = "tcp"
security_groups = [var.alb_sg] //comes from output from alb stack
}
现在我有一些错误:
│ Error: Cycle: module.ecs.var.alb_sg (expand), module.ecs.aws_security_group.ecs_sg, module.ecs.output.ecs_sg (expand), module.alb.var.ecs_sg (expand), module.alb.aws_security_group.alb_sg, module.alb.output.alb_sg (expand)
如何解决?谢谢
【问题讨论】:
标签: terraform amazon-ecs aws-application-load-balancer