Skip to content

Commit

Permalink
🧹 add tags to ec2 instances (#3588)
Browse files Browse the repository at this point in the history
  • Loading branch information
vjeffrey authored Mar 19, 2024
1 parent 751dab2 commit cfe1ff3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions providers/aws/resources/discovery_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ func addConnectionInfoToEc2Asset(instance *mqlAwsEc2Instance, accountId string,
asset.Labels["mondoo.com/region"] = instance.Region.Data
asset.Labels["mondoo.com/platform"] = instance.PlatformDetails.Data
asset.Labels["mondoo.com/instance-type"] = instance.InstanceType.Data
asset.Labels["mondoo.com/parent-id"] = accountId
asset.Labels["mondoo.com/instance-id"] = instance.InstanceId.Data

if instance.GetImage().Data != nil {
asset.Labels["mondoo.com/image"] = instance.GetImage().Data.Id.Data
Expand Down Expand Up @@ -285,6 +287,7 @@ func addConnectionInfoToEc2Asset(instance *mqlAwsEc2Instance, accountId string,
User: probableUsername,
Type: vault.CredentialType_aws_ec2_ssm_session,
})
asset.Labels["mondoo.com/ssm-connection"] = "Online"
}
}
} else {
Expand Down

0 comments on commit cfe1ff3

Please sign in to comment.