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

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.
主站蜘蛛池模板: 江山市| 顺义区| 华池县| 南开区| 翁源县| 浦城县| 白朗县| 敦化市| 铜山县| 榆中县| 扶余县| 汝阳县| 中方县| 安宁市| 英吉沙县| 兰溪市| 上杭县| 泌阳县| 兰考县| 固始县| 平远县| 新安县| 海宁市| 冷水江市| 冷水江市| 方山县| 杭锦旗| 苗栗县| 聂拉木县| 青川县| 蓝山县| 连云港市| 五台县| 勐海县| 邹城市| 鄂托克前旗| 故城县| 景泰县| 安福县| 塔城市| 大埔区|