From f01fa7c98fe70e1cf9891a064573986d510a433a Mon Sep 17 00:00:00 2001 From: Erik Kristensen Date: Fri, 13 Dec 2024 08:22:16 -0700 Subject: [PATCH] fix(cloudwatch-alarm): query for both composite and metric alarms --- resources/cloudwatch-alarms.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/cloudwatch-alarms.go b/resources/cloudwatch-alarms.go index a7d9bc22..f1e6b002 100644 --- a/resources/cloudwatch-alarms.go +++ b/resources/cloudwatch-alarms.go @@ -3,6 +3,8 @@ package resources import ( "context" + "github.com/gotidy/ptr" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudwatch" @@ -33,6 +35,10 @@ func (l *CloudWatchAlarmLister) List(_ context.Context, o interface{}) ([]resour resources := make([]resource.Resource, 0) params := &cloudwatch.DescribeAlarmsInput{ + AlarmTypes: []*string{ + ptr.String(cloudwatch.AlarmTypeCompositeAlarm), + ptr.String(cloudwatch.AlarmTypeMetricAlarm), + }, MaxRecords: aws.Int64(100), }