官术网_书友最值得收藏!

Cross-stack references

When using the layered cake approach, it's very common to want to use outputs from one stack as inputs in another stack. For example, you may create a VPC in one stack and require its VPC ID when creating resources in another.

For a long time, one needed to provide some glue around stack creation to pass output between stacks. AWS recently introduced cross-stack references, which provide a more native way of doing this.

You can now export one or more outputs from your stack. This makes those outputs available to other stacks. Note that the name of this value needs to be unique, so it's probably a good idea to include the CloudFormation stack name in the name you're exporting to achieve this.

Once a value is exported, it becomes available to be imported in another stack using the Fn::ImportValue function—very handy!

Make sure, however, that during the time an exported value is being referenced, you are not able to delete or modify it. Additionally, you won't be able to delete the stack containing the exported value. Once something is referencing an exported value, it's there to stay until there are no stacks referencing it at all.
主站蜘蛛池模板: 皮山县| 奇台县| 九台市| 乳源| 金塔县| 浙江省| 兴安盟| 隆安县| 临泽县| 常熟市| 盐津县| 凤庆县| 林甸县| 湖南省| 乐都县| 花莲县| 鄄城县| 茂名市| 长寿区| 华池县| 司法| 太和县| 白山市| 奇台县| 彩票| 府谷县| 合作市| 乐山市| 梓潼县| 通山县| 城口县| 松阳县| 沙雅县| 焦作市| 镇平县| 米脂县| 龙井市| 九龙城区| 徐闻县| 定西市| 龙江县|