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

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.
主站蜘蛛池模板: 清新县| 册亨县| 江永县| 聂荣县| 饶阳县| 陈巴尔虎旗| 昭平县| 黄平县| 临武县| 信丰县| 东辽县| 罗城| 会理县| 江北区| 宁德市| 包头市| 铜梁县| 新郑市| 通海县| 陆河县| 克什克腾旗| 海兴县| 防城港市| 南康市| 贵南县| 安义县| 玛纳斯县| 社旗县| 澜沧| 云梦县| 天峻县| 嵊泗县| 江川县| 博兴县| 嘉义市| 东乡县| 姚安县| 西藏| 长春市| 清徐县| 句容市|