amazon-web-services - 将AWS CloudFormation转换为Terraform模板

标签 amazon-web-services amazon-cloudformation terraform

我想将现有的AWS CloudFormation模板(yaml)自动转换为Terraform模板(hcl)。

谁能建议一些工具,方法等?

最佳答案

从概念上看,CFT和TF在功能上并不等效。您将无法表达CFT可以在TF中部署的所有内容。

从实际的 Angular 来看,这是有可能的,但是您需要编写一个语法转换器。如果您的CFT使用内在函数https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html,那将变得非常复杂(几乎不可能)

我认为,您应该使用terraform aws_cloudformation_stack来部署现有的CFT,而不要尝试对其进行转换(https://www.terraform.io/docs/providers/aws/r/cloudformation_stack.html)。

关于amazon-web-services - 将AWS CloudFormation转换为Terraform模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50899376/

相关文章:

ruby-on-rails - Rails Active Storage & AWS S3 : How to attach image to model through seeds. rb 然后将其存储在 S3 私有(private)存储桶中?

azure - 如何使用 Terraform 配置 Azure AD B2C 租户?

amazon-web-services - CloudFormation AutoScalingGroup 不等待更新/扩展信号

azure - Terraform local-exec Provisioner 在多个 Azure 虚拟机上运行

azure - Azure 云上的 Terraform - VM 名称和数据磁盘名称未对齐

amazon-web-services - 此数据文件中的架构必须与数据源 : Amazon Machine Learning 匹配

r - 使用 AWS 与 R 进行并行处理

amazon-web-services - AWS::CloudFormation::Init 未安装包

amazon-web-services - 以 SQS 队列为目标的 CloudWatch 事件无法正常工作