From cfe1ff3feec24c6e2217bbb71cdd7f15d03b779e Mon Sep 17 00:00:00 2001 From: vjeffrey Date: Tue, 19 Mar 2024 01:22:00 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20add=20tags=20to=20ec2=20instance?= =?UTF-8?q?s=20(#3588)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- providers/aws/resources/discovery_conversion.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/providers/aws/resources/discovery_conversion.go b/providers/aws/resources/discovery_conversion.go index 329f91b653..d34e6ce2e7 100644 --- a/providers/aws/resources/discovery_conversion.go +++ b/providers/aws/resources/discovery_conversion.go @@ -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 @@ -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 {