hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.61k stars 9k forks source link

[Bug]: `aws_glue_workflow` with on_demand start trigger ALWAYS starts automatically #38222

Closed Alsaxian closed 13 hours ago

Alsaxian commented 3 days ago

Terraform Core Version

1.8.4

AWS Provider Version

5.56.1

Affected Resource(s)

aws_glue_workflow aws_glue_trigger

Expected Behavior

After running terraform apply, a Glue workflow with a start trigger of type "ON_DEMAND" should just lie there waiting to be run, as if it was created on AWS UI.

Actual Behavior

Even when I set start_on_creation to false in aws_glue_trigger, which is not neccessary according to the trigger's documentation, the Glue Workflow will automatically run after being created, without any actions from my side. No matter if the jobs then fail or not, this is not correct.

Relevant Error/Panic Output Snippet

No error messages.

Terraform Configuration Files

resource "aws_glue_workflow" "daily" {
  name = ...
}

resource "aws_glue_trigger" "daily_starter" {
  name = ...
  type = "ON_DEMAND"
  workflow_name = aws_glue_workflow.daily.name
  start_on_creation = false ## As I said, this is even not necessary acccording to the docu
}

Steps to Reproduce

It is simple like that.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 3 days ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

acwwat commented 3 days ago

@Alsaxian According to #17413, the enabled flag is used to specified whether an ON_DEMAND trigger should start on creation or update. You can set it to false to meet your needs - please give it a try and report back on the results for closure.

The start_on_creation argument is not applicable to on-demand triggers as you pointed out.

Alsaxian commented 1 day ago

@acwwat Thank you, that solved my problem! The name seems a bit misleading to me though, since I thought enabled should correspond to the activation and the deactivation of conditional and scheduled triggers.

github-actions[bot] commented 13 hours ago

[!WARNING] This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.