Skip to content

Commit d73219e

Browse files
Merge pull request #62 from jinyoungmoonDEV/master
fix: add security_group instances count field in data.stats field
2 parents 6c2d224 + 98f3671 commit d73219e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/plugin/manager/ec2/security_group_manager.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,19 @@ def create_cloud_service(self, region, options, secret_data, schema):
118118
)
119119
)
120120

121+
match_instances = self.get_security_group_map_instances(
122+
raw, instances
123+
)
124+
121125
raw.update(
122126
{
123127
"ip_permissions": inbound_rules,
124128
"ip_permissions_egress": outbound_rules,
125-
"instances": self.get_security_group_map_instances(
126-
raw, instances
127-
),
129+
"instances": match_instances,
128130
"cloudtrail": self.set_cloudtrail(
129131
region, cloudtrail_resource_type, raw["GroupId"]
130132
),
133+
"stats": {"instances_count": len(match_instances)},
131134
}
132135
)
133136
sg_vo = raw

0 commit comments

Comments
 (0)