Skip to content

add support for cloud-nuke-excluded tag in Cloudtrail resource #839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ of the file that are supported are listed here.
| cloudwatch-alarm | CloudWatchAlarm | ✅ (Alarm Name) | ✅ (AlarmConfigurationUpdated Time) | ❌ | ✅ |
| cloudwatch-dashboard | CloudWatchDashboard | ✅ (Dashboard Name) | ✅ (LastModified Time) | ❌ | ✅ |
| cloudwatch-loggroup | CloudWatchLogGroup | ✅ (Log Group Name) | ✅ (Creation Time) | ❌ | ✅ |
| cloudtrail | CloudtrailTrail | ✅ (Trail Name) | ❌ | | ✅ |
| cloudtrail | CloudtrailTrail | ✅ (Trail Name) | ❌ | | ✅ |
| codedeploy-application | CodeDeployApplications | ✅ (Application Name) | ✅ (Creation Time) | ❌ | ✅ |
| config-recorders | ConfigServiceRecorder | ✅ (Recorder Name) | ❌ | ❌ | ✅ |
| config-rules | ConfigServiceRule | ✅ (Rule Name) | ❌ | ❌ | ✅ |
Expand Down
1 change: 1 addition & 0 deletions aws/resources/cloudtrail.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func (ct *CloudtrailTrail) getAll(c context.Context, configObj config.Config) ([
for _, trailInfo := range page.Trails {
if configObj.CloudtrailTrail.ShouldInclude(config.ResourceValue{
Name: trailInfo.Name,
Tags: util.ConvertTypesTagsToMap(trailInfo.Tags),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The resource you are iterating over lacks the 'Tags' field. You need to call this method for each resource first.

}) {
trailIds = append(trailIds, trailInfo.TrailARN)
}
Expand Down