![]() |
1
2
这开始触及AWS安全组的限制,因为它们可以 only specify allow rules and not deny rules only have 60 inbound and 60 outbound rules per group 理想情况下,您可以这样定义一个变量
然后可以用来建立 aws_security_group_rule resources 与您在问题中发布的内容类似(即从/到0-24、26-464和466-65535块)。不幸的是,这将是相当困难的,如果可能的话,会导致一种丑陋的/黑客式的方法来基于所提供的变量生成from/to端口。这是因为在Terraform的最新版本(v0.11)中不支持映射列表元素(参考 this terraform issue this one |