Skip to content

Commit

Permalink
Update MSK Cluster to include tags in the properties (#956)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsch150 committed Mar 17, 2023
1 parent dc4f7d3 commit c18155b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions resources/msk-cluster.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package resources

import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/kafka"
"github.com/rebuy-de/aws-nuke/v2/pkg/types"
Expand All @@ -10,6 +11,7 @@ type MSKCluster struct {
svc *kafka.Kafka
arn string
name string
tags map[string]*string
}

func init() {
Expand All @@ -30,6 +32,7 @@ func ListMSKCluster(sess *session.Session) ([]Resource, error) {
svc: svc,
arn: *cluster.ClusterArn,
name: *cluster.ClusterName,
tags: cluster.Tags,
})

}
Expand All @@ -54,6 +57,9 @@ func (m *MSKCluster) String() string {

func (m *MSKCluster) Properties() types.Properties {
properties := types.NewProperties()
for tagKey, tagValue := range m.tags {
properties.SetTag(aws.String(tagKey), tagValue)
}
properties.Set("ARN", m.arn)
properties.Set("Name", m.name)

Expand Down

0 comments on commit c18155b

Please sign in to comment.