gpt4 book ai didi

amazon-web-services - 云形成 : How to deploy changes with affecting existing resources

转载 作者:行者123 更新时间:2023-12-03 07:38:39 25 4
gpt4 key购买 nike

我希望在现有堆栈中部署更改,而不影响对当前角色、安全组、集群等的任何更改。

如何做到这一点?如果替换当前模板,是否会影响当前的角色、安全组、集群等?

请帮忙。

当我进行更改并删除现有堆栈并测试新更改时,正如预期的那样,它在开发环境中工作正常。要部署相同的内容,我们不想删除现有堆栈,如何导入新的更改?

最佳答案

来自Update behaviors of stack resources - AWS CloudFormation :

When you submit an update, AWS CloudFormation updates resources based on differences between what you submit and the stack's current template. Resources that haven't changed run without disruption during the update process.

The method AWS CloudFormation uses depends on which property you update for a given resource type. Depending on the update behavior, you can decide when to modify resources to reduce the impact of these changes on your application. In particular, you can plan when resources must be replaced during an update. For example, if you update the Port property of an AWS::RDS::DBInstance resource type, AWS CloudFormation replaces the DB instance by creating a new DB instance with the updated port setting and deletes the old DB instance.

基本上,资源将保持原样,除非在模板中对其进行了专门更改。某些资源类型可以就地更新,而其他资源类型则需要完全替换正在更改的资源。

通过 CloudFormation 堆栈创建的资源应始终通过修改模板然后部署更改来更改。这样,CloudFormation 就可以了解资源及其配置。如果您在 CloudFormation 外部更改资源,则会与 CloudFormation 认为已部署的资源产生“偏差”。

关于amazon-web-services - 云形成 : How to deploy changes with affecting existing resources,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75694276/

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