将现有的AWS资源整合到Cloudformation堆栈中 [英] Incorporate existing AWS resources into a cloudformation stack

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

问题描述

是否可以将在cloudformation之外创建的现有AWS资源合并到现有cloudformation堆栈中?我想这样做,而不必在cloudformation堆栈中添加新资源并将现有资源的数据迁移到该新资源上。我看到AWS现在具有针对云形成堆栈的漂移检测。我想知道是否可以利用该资源将现有资源合并到堆栈中。

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天全站免登陆