将现有 AWS 资源合并到 CloudFormation 堆栈中 [英] Incorporate existing AWS resources into a CloudFormation stack

查看:22
本文介绍了将现有 AWS 资源合并到 CloudFormation 堆栈中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将在 CloudFormation 之外创建的现有 AWS 资源合并到现有 CloudFormation 堆栈中?我想这样做而不必在 CloudFormation 堆栈中添加新资源并将现有资源的数据迁移到该新资源.我看到 AWS 现在对 CloudFormation 堆栈进行了漂移检测.我想知道是否可以利用它来将现有资源合并到一个堆栈中.

Is there a way to incorporate existing AWS resources that were created outside of CloudFormation into an existing CloudFormation stack? I'd like to do this without having to add a new resource in the CloudFormation stack and migrate the existing resource's data over to that new resource. I see that AWS now has drift detection for CloudFormation stacks. I'm wondering if that might be able to be leveraged to incorporate existing resources into a stack.

推荐答案

将资源导入/采用到现有 CloudFormation 堆栈的能力是 CloudFormation 客户的第一要求.一段时间以来,我们一直在考虑如何去做,但还没有找到既适合客户需求又适合服务运营规模的机制.

The ability to import/adopt resources into an existing CloudFormation stack is the #1 ask from CloudFormation customers. We've been thinking about ways to do it for a while, but haven't hit upon the mechanism that both fits customer needs and works at the scale the service operates.

由于我们不会在服务之外的任何地方公开堆栈状态信息供您修改,因此在我们提供采用功能之前您可以采取的唯一方法是将有关资源的元数据存储在参数存储中,或者使用自定义资源作为包装器来检索有关底层资源的信息,然后通过 Fn::GetAtt 将其显示到您的堆栈中.

Since we don't expose stack state info anywhere outside the service for you to modify, the only approach you can take until we offer an adoption feature is to either store metadata about the resources in a parameter store, or use a custom resource as a wrapper to retrieve the information about the underlying resource and then surface it to your stack via Fn::GetAtt.

这篇关于将现有 AWS 资源合并到 CloudFormation 堆栈中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆