Resource: aws_glue_workflow

Provides a Glue Workflow resource. The workflow graph (DAG) can be build using the aws_glue_trigger resource. See the example below for creating a graph with four nodes (two triggers and two jobs).

Example Usage

resource "aws_glue_workflow" "example" {
  name = "example"
}

resource "aws_glue_trigger" "example-start" {
  name          = "trigger-start"
  type          = "ON_DEMAND"
  workflow_name = aws_glue_workflow.example.name

  actions {
    job_name = "example-job"
  }
}

resource "aws_glue_trigger" "example-inner" {
  name          = "trigger-inner"
  type          = "CONDITIONAL"
  workflow_name = aws_glue_workflow.example.name

  predicate {
    conditions {
      job_name = "example-job"
      state    = "SUCCEEDED"
    }
  }

  actions {
    job_name = "another-example-job"
  }
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import Glue Workflows using name. For example:

import {
  to = aws_glue_workflow.MyWorkflow
  id = "MyWorkflow"
}

Using terraform import, import Glue Workflows using name. For example:

% terraform import aws_glue_workflow.MyWorkflow MyWorkflow