Skip to content

Feature request: way to delete orphaned triggers #50

@coopernurse

Description

@coopernurse

First off, thanks for writing this plugin, it's pretty handy.

I like the inlined trigger support, but it looks like if you rename a trigger the old ones remain (at least CloudWatch Events do - didn't try SNS).

It would be nice if there was some way to mark a trigger "deleted" which would be applied the next time the plugin is run. This would eliminate the need to go and remove an orphaned trigger manually.

One possibility might be to add an optional "deleted" attribute to the triggers JSON, (default=false) which if true would remove the trigger. For example:

"triggers": [
                        { "integration": "CloudWatch Events - Schedule",
                          "ruleName": "every-minute",
                          "deleted": true },
                        { "integration": "CloudWatch Events - Schedule",
                          "ruleName": "an-active-trigger",
                          "ruleDescription": "runs lambda every minute",
                          "scheduleExpression": "rate(1 minutes)" }
                ]

every-minute would be deleted if it exists, while an-active-trigger would be created/updated.

This would enable a workflow where you could mark a trigger deleted for some amount of time until you're sure the lambda has been deployed across all environments and the orphaned trigger removed. Then the deleted trigger rule could be removed from the triggers array entirely.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions