Open vaquarkhan opened 2 weeks ago
Voting for Prioritization
Volunteering to Work on This Issue
Logs
terraform apply
module.glue_trigger.aws_glue_trigger.default[0]: Refreshing state... [id=glue-job-trigger-2]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# module.glue_trigger.aws_glue_trigger.default[0] will be created
+ resource "aws_glue_trigger" "default" {
+ arn = (known after apply)
+ description = "An example Glue trigger."
+ enabled = true
+ id = (known after apply)
+ name = "glue-job-trigger-2"
+ schedule = "cron(0 12 * * ? *)"
+ start_on_creation = true
+ state = (known after apply)
+ tags_all = (known after apply)
+ type = "SCHEDULED"
+ actions {
+ job_name = "glueJob01CBE81D-QUZVpWC00kZS"
+ timeout = 60
+ notification_property {
+ notify_delay_after = 5
}
}
+ predicate {
+ logical = "AND"
+ conditions {
+ job_name = "glueJob01CBE81D-QUZVpWC00kZS"
+ logical_operator = "EQUALS"
+ state = "SUCCEEDED"
}
}
}
Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
module.glue_trigger.aws_glue_trigger.default[0]: Creating...
module.glue_trigger.aws_glue_trigger.default[0]: Creation complete after 1s [id=glue-job-trigger-2]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
----------------------------------------------------------------
$ terraform apply
module.glue_trigger.aws_glue_trigger.default[0]: Refreshing state... [id=glue-job-trigger-2]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# module.glue_trigger.aws_glue_trigger.default[0] will be updated in-place
~ resource "aws_glue_trigger" "default" {
id = "glue-job-trigger-2"
name = "glue-job-trigger-2"
~ schedule = "cron(00 12 * * ? *)" -> "cron(0 12 * * ? *)"
tags = {}
# (7 unchanged attributes hidden)
+ predicate {
+ logical = "AND"
+ conditions {
+ job_name = "glueJob01CBE81D-QUZVpWC00kZS"
+ logical_operator = "EQUALS"
+ state = "SUCCEEDED"
}
}
# (1 unchanged block hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
module.glue_trigger.aws_glue_trigger.default[0]: Modifying... [id=glue-job-trigger-2]
╷
│ Error: updating Glue Trigger (glue-job-trigger-2): operation error Glue: UpdateTrigger, https response error StatusCode: 400, RequestID: 65f9876e-2ab7-4b58-b71a-bbe699739d50, InvalidInputException: Job cannot be a Predicate and Action for Conditional Trigger.
│
│ with module.glue_trigger.aws_glue_trigger.default[0],
│ on ..\..\main.tf line 1, in resource "aws_glue_trigger" "default":
│ 1: resource "aws_glue_trigger" "default" {
│
Terraform Core Version
1.5.4
AWS Provider Version
5.61.0
Affected Resource(s)
I am running Glue trigger and when apply first time will work as expected but when i am running same again it should skip changes as same trigger already deployed or override but i am getting following error
Expected Behavior
Will save no change found in configuration or update same without error
Actual Behavior
Throwing error
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
Debug Output
Shared above
Panic Output
No response
Important Factoids
This issue not related to IAM as i tried with admin access and restrict access , error would be same .
References
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/glue_trigger
Would you like to implement a fix?
Yes