AWS Glue Workflow using EVENT Trigger Error

Terraform Version info:
Terraform v1.0.11
on darwin_amd64

I am trying to create an AWS Glue Workflow, that is initiated with a Glue Trigger using Type of EVENT. I am getting the following error:

│ Error: error creating Glue Trigger (bmw-e2e-final_view-glue-trigger): InvalidInputException: Starting trigger on create is not supported for EVENT trigger type.

The Terraform code is below

resource “aws_glue_workflow” “e2e_final-view-workflow” {
name = “bmw-e2e-final_view-glue-workflow”
description = “E2E Workflow to process data for E2E Dashboard FinalView”
max_concurrent_runs = 1
}
resource “aws_glue_trigger” “e2e-final_view-glue-trigger” {
name = “bmw-e2e-final_view-glue-trigger”
description = “Trigger to start final_view Glue job”
type = “EVENT”

actions {
  job_name = aws_glue_job.e2e-final_view-ingest.name
}

workflow_name = aws_glue_workflow.e2e_final-view-workflow.name

depends_on = [
aws_glue_workflow.e2e_final-view-workflow
]

}
resource “aws_glue_trigger” “e2e-crawlers-trigger” {
name = “bmw-e2e-crawlers-trigger”
description = “Trigger to start crawl the data to view in Athena”
type = “CONDITIONAL”

actions {
crawler_name = aws_glue_crawler.bmw_e2e.name

}
predicate {
conditions {
job_name = aws_glue_job.e2e-final_view-ingest.name
state = “SUCCEEDED”
}
}

workflow_name = aws_glue_workflow.e2e_final-view-workflow.name

depends_on = [
aws_glue_workflow.e2e_final-view-workflow
]
}

When I use the AWS Console to create the Glue Workflow and the Trigger, it allows me to select the following trigger type:

Schedule
Event
On demand
EventBridge event

However, in terraform, if I set the Glue Trigger type to “EventBridge event” it throws an error indicating that this is an invalid type.

Any insights would be appreciated.

Kevin

Yes, please provide solution to this …

In terraform … how do we set the type as “EVENT” or “EVENTBRIDGE”…

Essentially, how to trigger the glue job from event bridge

I was able to get this to work using the following:

resource “aws_glue_trigger” “e2e-generic-glue-crawlers-trigger” {
name = “bmw-generic-glue-crawlers-trigger”
description = “Trigger to start generic Glue job”
type = “EVENT”
enabled = false

actions {
  crawler_name = aws_glue_crawler.bmw_loyalty.name
}
 actions {
  crawler_name = aws_glue_crawler.bmw_e2e_lookupFiles.name
}

workflow_name = aws_glue_workflow.e2e_generic_workflow.name

}

By setting enabled = false fixed my problem.