Skip to content

Commit

Permalink
feat(cloudwatchevents-target): add properties
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen committed Jan 4, 2025
1 parent 995b7b0 commit 60243b3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion resources/cloudwatchevents-targets.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package resources

import (
"context"
"github.com/ekristen/libnuke/pkg/types"

"fmt"

Expand Down Expand Up @@ -87,6 +88,12 @@ func (target *CloudWatchEventsTarget) Remove(_ context.Context) error {

func (target *CloudWatchEventsTarget) String() string {
// TODO: change this to IAM format rule -> target and mark as breaking change for filters
// TODO: add properties for rule and target separately
return fmt.Sprintf("Rule: %s Target ID: %s", *target.ruleName, *target.targetID)
}

func (target *CloudWatchEventsTarget) Properties() types.Properties {
return types.NewProperties().
Set("Name", target.ruleName).
Set("TargetID", target.targetID).
Set("BusName", target.busName)
}

0 comments on commit 60243b3

Please # to comment.