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.73k stars 9.09k forks source link

Add support for one time schedule deletion in resource aws_scheduler_schedule #38166

Open Anitha78 opened 2 months ago

Anitha78 commented 2 months ago

Description

Eventbridge scheduler has an optional setting "Action after schedule completion" which deletes the one time schedule after its invocation. This helps to keep the schedules deleted after their one time invocation. Please include this as part if resource - aws_scheduler_schedule

Affected Resource(s) and/or Data Source(s)

aws_scheduler_schedule

Potential Terraform Configuration

resource "aws_scheduler_schedule" "example_trigger" {
  name       = "example_trigger"

  action_after_schedule_completion = "DELETE"

  ...
}

References

https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-schedule-delete.html#managing-schedule-automatic-deletion

Would you like to implement a fix?

None

github-actions[bot] commented 2 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

dimaman2001 commented 2 months ago

@Anitha78 - How would Terraform maintain this resource if it is deleted by AWS but still present in your configuration? This may not make sense as Terraform managed resources are intended to be long-lived and managed via state.