Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 31 additions & 2 deletions destroy-cumulus/destroy_cumulus.py
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,34 @@ def delete(self, get_client):
client.delete_target_group(TargetGroupArn=str(self.arn))


class EventBridgePipe(StateResource):
TYPE_FILTER = "pipes:pipe"

@classmethod
def gather(cls, get_client, name_matcher, _options):
client = get_client("pipes")
paginator = client.get_paginator("list_pipes")

kwargs = (
dict(
NamePrefix=name_matcher.prefix,
)
if name_matcher.prefix
else {}
)

return [
cls.from_arn(Arn(entry["Arn"]), state=entry["CurrentState"])
for response in paginator.paginate(**kwargs)
for entry in response.get("Pipes", ())
if name_matcher.matches(entry["Name"])
]

def delete(self, get_client):
client = get_client("pipes")
client.delete_pipe(Name=self.name)


class EventSourceMapping(Resource):
TYPE_FILTER = "lambda:event-source-mapping"

Expand Down Expand Up @@ -2094,12 +2122,12 @@ class CumulusDestroyer:
RESOURCE_DESTRUCTION_ORDER = [
CloudFormationStack,
ApiGateway,
Certificate,
StepFunction,
LambdaFunction,
LambdaLayerVersion,
StepFunction,
Activity,
EventSourceMapping,
EventBridgePipe,
CloudWatchDashboard,
CloudWatchAlarm,
CloudWatchEventRule,
Expand All @@ -2119,6 +2147,7 @@ class CumulusDestroyer:
EFSFileSystem,
ELBLoadBalancer,
ELBTargetGroup,
Certificate,
RDSCluster,
RDSClusterParameterGroup,
RDSSubnetGroup,
Expand Down
2 changes: 1 addition & 1 deletion destroy-cumulus/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[project]
name = "destroy-cumulus"
version = "0.5.0"
version = "0.5.1"
description = ""
license = "Apache-2.0"
authors = [
Expand Down
Loading