我希望我的 CFT 将用户的子网列表作为参数并将其用于创建 ALB 子网。在为 ALB 创建资源时如何循环子网?
就像是:
ApplicationLoadBalancer:
Type: AWS::ElasticLoadBalancingV2::LoadBalancer
Properties:
Scheme: internet-facing # or internal
Subnets:
<% for _, subnet in subnets %>
- Ref: <%subnet%>
<% endfor %>
SecurityGroups:
- Ref: ELBSecurityGroup