【问题标题】:Exporting AWS Data Pipeline as CloudFormation template to use it in Terraform将 AWS Data Pipeline 导出为 CloudFormation 模板以在 Terraform 中使用它
【发布时间】:2017-12-23 04:38:59
【问题描述】:

我正在尝试以某种方式将现有 AWS Data Pipeline 任务导出到Terraform 基础设施。

据此,issue 没有直接支持 Data Pipelines,但使用 CloudFormation 模板 (terraform resource) 似乎仍然可以实现。

问题是我找不到将现有管道导出到 CloudFormation 模板的方法。

导出具有特定definition syntax 的管道将不起作用,因为我还没有找到将此定义包含到 CloudFormation 中的方法。 CloudFormer 也不支持导出管道。

是否有人知道如何将管道导出到 CloudFormation 或任何其他方式以使用 Terraform 自动化 AWS Data Pipeline?

感谢您的帮助!

【问题讨论】:

标签: amazon-web-services amazon-cloudformation terraform amazon-data-pipeline


【解决方案1】:

UPD [7 月] 2019]:在 terraform 存储库中取得了一些进展。 aws_datapipeline_pipeline 资源已经实现,但是目前还不清楚如何使用。 Merged pull request

原答案:

为了解决这个问题,我提出了一个 node.js 脚本,它涵盖了我的用例。此外,我还创建了一个 Terraform 模块,用于 Terraform 配置。

Here is the link to the gist with the code

将在此处复制使用示例。

命令行:

node converter-cli.js ./template.json "Data Pipeline Cool Name" "Data Pipeline Cool Description" "true" >> cloudformation.json

地形:

module "some_cool_pipeline" {
  source = "./pipeline"
  name = "cool-pipeline"
  description = "The best pipeline!"
  activate = true
  template = "${file("./cool-pipeline-template.json")}"

  values = {
    myDatabase = "some_database",
    myUsername = "${var.db_user}",
    myPassword = "${var.db_password}",
    myTableName = "some_table",
  }
}

【讨论】:

  • 新的 aws_datapipeline_pipeline 资源似乎只使用 terraform 跟踪管道。我缺少指向 json 管道配置的参数......也可能适合您的解决方案!谢谢
猜你喜欢
  • 2016-10-29
  • 2018-04-14
  • 1970-01-01
  • 2023-03-30
  • 1970-01-01
  • 2019-11-09
  • 2021-03-01
  • 1970-01-01
  • 2018-11-27
相关资源
最近更新 更多