简体   繁体   English

使用 AWS CLI 将现有资源导入 CloudFormation

[英]Use AWS CLI to import existing resources into CloudFormation

I have a collection of CloudFormation templates that I'm using to create new resources but I also have a small percentage of AWS resources that were created outside of CF that I now want to import into CF.我有一组用于创建新资源的 CloudFormation 模板,但我也有一小部分在 CF 之外创建的 AWS 资源,现在我想将其导入到 CF 中。 I know how to import existing resources into CF via the AWS dashboard but I want to do it with the CLI instead.我知道如何通过 AWS 仪表板将现有资源导入 CF,但我想改用 CLI。

This is the documentation I thought would help but it appears to be out of date as I don't have a "--resources-to-import" option when I run aws cloudformation create-stack help .这是我认为会有所帮助的文档,但它似乎已经过时,因为我在运行aws cloudformation create-stack help时没有“--resources-to-import”选项。 An up-to-date example would be very helpful if this is even possible via the command-line.如果这甚至可以通过命令行实现,那么最新的示例将非常有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM