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
-
arnoptional computed - string -
descriptionoptional - string -
enabledoptional - bool -
idoptional computed - string -
namerequired - string -
scheduleoptional - string -
stateoptional computed - string -
tagsoptional - map from string to string -
typerequired - string -
workflow_nameoptional - string -
actionslist block-
argumentsoptional - map from string to string -
crawler_nameoptional - string -
job_nameoptional - string -
security_configurationoptional - string -
timeoutoptional - number -
notification_propertylist block-
notify_delay_afteroptional - number
-
-
-
predicatelist block-
logicaloptional - string -
conditionslist block-
crawl_stateoptional - string -
crawler_nameoptional - string -
job_nameoptional - string -
logical_operatoroptional - string -
stateoptional - string
-
-
-
timeoutssingle 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
-
Typerequired - String -
StartOnCreationoptional - Boolean -
Descriptionoptional - String -
Actionsrequired - List of Action -
WorkflowNameoptional - String -
Scheduleoptional - String -
Tagsoptional - Json -
Nameoptional - String -
Predicateoptional - Predicate
Explanation in CloudFormation Registry
The
AWS::Glue::Triggerresource 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.