如何使用具有多个谓词的 Terraform 创建 AWS Glue 触发器?

问题描述 投票:0回答:1

我正在尝试使用 Terraform 创建 AWS Glue 条件触发器,但无法找到用于创建依赖于其他两个作业是否成功的触发器的正确语法。

我希望 example_job_3 由 example_job_1 和 example_job_2 的成功运行触发。

Terraform 显示示例作业的创建。

resource "aws_glue_job" "example_job_1" {
  name         = "example_job_1"
  role_arn     = aws_iam_role.Glue_Role.arn
  command {
    name            = "glueetl"
    script_location = "s3://path/to/script1.py"
  }
}

resource "aws_glue_job" "example_job_2" {
  name         = "example_job_2"
  role_arn     = aws_iam_role.Glue_Role.arn
  command {
    name            = "glueetl"
    script_location = "s3://path/to/script2.py"
  }
}

resource "aws_glue_job" "example_job_3" {
  name         = "example_job_3"
  role_arn     = aws_iam_role.Glue_Role.arn
  command {
    name            = "glueetl"
    script_location = "s3://path/to/script3.py"
  }
}

由于语法问题,我无法通过 terraform 验证。

amazon-web-services terraform aws-glue terraform-provider-aws
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.