gpt4 book ai didi

amazon-web-services - 如何修复 EC2 实例启动和停止后的 AWS Cloud Formation 漂移?

转载 作者:行者123 更新时间:2023-12-02 04:22:14 28 4
gpt4 key购买 nike

我有一个 AWS Cloud Formation 堆栈。我启动并停止了该堆栈中的 EC2 实例。现在堆栈已漂移,下面是漂移结果。我该如何解决这个问题,因为预期和实际都是相同的。

enter image description here

最佳答案

我不相信这与重新启动您的AWS::EC2::Instance有关。我使用此模板重新启动并停止并启动了一个实例,并且在运行偏差检测后偏差状态仍为 IN_SYNC:

Parameters:
ImageId:
Type: AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>
Default: /aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2
Resources:
Instance:
Type: AWS::EC2::Instance
Properties:
ImageId: !Ref ImageId
Tags:
- Key: Key
Value: Value

EC2 实例上的标签与模板中的标签匹配吗?

关于amazon-web-services - 如何修复 EC2 实例启动和停止后的 AWS Cloud Formation 漂移?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58977103/

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