AWS Glue Trigger
This page shows how to write Terraform and CloudFormation for AWS Glue Trigger and write them securely.
aws_glue_trigger (Terraform)
The Trigger in AWS Glue can be configured in Terraform with the resource name aws_glue_trigger
. The following sections describe 2 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_glue_trigger" "start_complex" {
name = "start_complex"
type = "ON_DEMAND"
workflow_name = module.glue_workflow_complex.workflow_name
dynamic "actions" {
resource "aws_glue_trigger" "scheduled_trigger" {
name = "scheduled_trigger"
schedule = "cron(0 0 * * ? *)"
type = "SCHEDULED"
actions {
Parameters
-
arn
optional computed - string -
description
optional - string -
enabled
optional - bool -
id
optional computed - string -
name
required - string -
schedule
optional - string -
state
optional computed - string -
tags
optional - map from string to string -
type
required - string -
workflow_name
optional - string -
actions
list block-
arguments
optional - map from string to string -
crawler_name
optional - string -
job_name
optional - string -
security_configuration
optional - string -
timeout
optional - number -
notification_property
list block-
notify_delay_after
optional - number
-
-
-
predicate
list block-
logical
optional - string -
conditions
list block-
crawl_state
optional - string -
crawler_name
optional - string -
job_name
optional - string -
logical_operator
optional - string -
state
optional - string
-
-
-
timeouts
single block
Explanation in Terraform Registry
Manages a Glue Trigger resource.
AWS::Glue::Trigger (CloudFormation)
The Trigger in Glue can be configured in CloudFormation with the resource name AWS::Glue::Trigger
. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
Type: AWS::Glue::Trigger
Properties:
Actions:
- JobName: !Ref GlueJobTrigger1Name
Description: !Ref GlueJobTrigger1Description
Name: !Ref GlueJobTrigger1Name
Type: AWS::Glue::Trigger
Properties:
Name: t_Start
Type: SCHEDULED
Schedule: cron(0 8 * * ? *) # Runs once a day at 8 AM UTC
StartOnCreation: true
Type: AWS::Glue::Trigger
Properties:
Name: t_Start
Type: SCHEDULED
Schedule: cron(0 8 * * ? *) # Runs once a day at 8 AM UTC
StartOnCreation: true
Type: "AWS::Glue::Trigger"
Properties:
Actions:
- CrawlerName: !Ref GlueCrawler6RawCrawler
Name: !Sub "ScheduledStart-${AWS::Region}"
Type: SCHEDULED
Type: "AWS::Glue::Trigger"
Properties:
Actions:
- CrawlerName: !Ref GlueCrawler6RawCrawler
Name: !Sub "ScheduledStart-${AWS::Region}"
Type: SCHEDULED
"Type": "AWS::Glue::Trigger",
"Properties": {
"Actions": [
{
"JobName": "glue-workflow-assetjob",
"Timeout": 120
"path": "/PropertyTypes/AWS::Glue::Trigger.Predicate/Properties/Logical/Value",
"value": {
"ValueType": "AWS::Glue::Trigger.Predicate.Logical"
}
},
{
"path": "/PropertyTypes/AWS::Glue::Trigger.Predicate/Properties/Logical/Value",
"value": {
"ValueType": "AWS::Glue::Trigger.Predicate.Logical"
}
},
{
"Type": "AWS::Glue::Trigger",
"Properties": {
"Name": "Start-WF",
"Type": "ON_DEMAND",
"Description": "Starting the WF trigger",
"Actions": [{
"Type": "AWS::Glue::Trigger",
"Properties": {
"Actions": [
{
"JobName": "tpcds-benchmark-create-tables"
}
Parameters
-
Type
required - String -
StartOnCreation
optional - Boolean -
Description
optional - String -
Actions
required - List of Action -
WorkflowName
optional - String -
Schedule
optional - String -
Tags
optional - Json -
Name
optional - String -
Predicate
optional - Predicate
Explanation in CloudFormation Registry
The
AWS::Glue::Trigger
resource specifies triggers that run AWS Glue jobs. For more information, see Triggering Jobs in AWS Glue and Trigger Structure in the AWS Glue Developer Guide.
Frequently asked questions
What is AWS Glue Trigger?
AWS Glue Trigger is a resource for Glue of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS Glue Trigger?
For Terraform, the SJREDDY6/terra and m-voels/tftest source code examples are useful. See the Terraform Example section for further details.
For CloudFormation, the MarcoAP/AWSTraining, duyhoang15/test and aws-samples/provision-codepipeline-glue-workflows source code examples are useful. See the CloudFormation Example section for further details.