如何理解 terraform 计划输出中某些资源的“替换”和“更新”
How to understand the `replace` and `update` of some resources in terraform plan output
当我做 Terraform 计划时,计划显示一些资源需要更换,一些需要更新。
我不太清楚replace
是什么意思。这是否意味着资源将被销毁并重新创建? update
和 replace
有什么区别?
does it mean the resource will be destoryed and re-created?
是的。取决于资源,这种替换可能是灾难性的,例如如果没有备份,替换数据库将导致完整数据丢失。
what's is the difference between update and replace?
更新不会填满 replace/destroy 资源。
简短的回答是:一些资源可以就地更新,这就是已更新的意思。替换意味着资源将被销毁,然后根据需要重新创建。
当我做 Terraform 计划时,计划显示一些资源需要更换,一些需要更新。
我不太清楚replace
是什么意思。这是否意味着资源将被销毁并重新创建? update
和 replace
有什么区别?
does it mean the resource will be destoryed and re-created?
是的。取决于资源,这种替换可能是灾难性的,例如如果没有备份,替换数据库将导致完整数据丢失。
what's is the difference between update and replace?
更新不会填满 replace/destroy 资源。
简短的回答是:一些资源可以就地更新,这就是已更新的意思。替换意味着资源将被销毁,然后根据需要重新创建。