1 個回答
- 最新
- 最多得票
- 最多評論
0
Unfortunately I thinnk there is no direct way to reference the secondary CIDR blocks for a VPC when using IPAM and CloudFormation. However, here are two potential options:
Use a Custom Resource to call the DescribeIpams API after creation to lookup the IPAM ID for the VPC, then call GetIpamResourceCidrs to retrieve the secondary CIDRs. You could store these CIDR values in Parameters or Outputs.
Use a Custom Resource with AWS Lambda to call the EC2 ModifyVpcAttribute API after creation to tag the VPC with the secondary CIDRs. Then reference the tags in other resources that need the values.
已回答 7 個月前
相關內容
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 3 年前
Thanks Dave, later on i realized their is no straight forward way of doing it , so created lambda function s custom resource and call the "describe_vpc" api, fetched in vpc cidr ( index1 ) and then use that to pass in as parameter in the subnet creation module. this works. But thanks for replying that is also an option .