gpt4 book ai didi

amazon-web-services - 将 AWS 拆分列表转换为多个 yaml/json block

转载 作者:行者123 更新时间:2023-12-03 07:23:23 25 4
gpt4 key购买 nike

我们在 AWS Cloudformation 中有一个导出参数,它描述了 Cidrs 列表。

我们需要为列表中的每个项目创建一个 EC2 安全组条目,即

SecurityGroupEgress:
- CidrIp: <1st-entry-in-list>
IpProtocol: -1
- CidrIp: <2nd-entry-in-list>
IpProtocol: -1
- CidrIp: <3rd-entry-in-list>
IpProtocol: -1
- etc....

我们有办法做到这一点吗?

最佳答案

Is there a way we can do this?

在普通 CFN 中,因为这需要 CFN 没有的循环机制。您必须开发一个 CFN macrocustom resource为此。

关于amazon-web-services - 将 AWS 拆分列表转换为多个 yaml/json block ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68285068/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com