UPD: prefer resource name over resource id in aws-inventory-from-awsconfig.py
This commit is contained in:
parent
b8d737e595
commit
2e957ee960
|
@ -20,10 +20,12 @@ for item in resp['resourceCounts']:
|
|||
"AWS::RDS::DBSnapshot",
|
||||
"AWS::SSM::ManagedInstanceInventory",
|
||||
"AWS::SSM::AssociationCompliance",
|
||||
"AWS::SSM::PatchCompliance",
|
||||
"AWS::IAM::Policy"
|
||||
]:
|
||||
continue
|
||||
results += [[item['resourceType'], res['resourceId']]]
|
||||
preferResName = res.get('resourceName', res.get('resourceId'))
|
||||
results += [[item['resourceType'], preferResName]]
|
||||
if nextToken is None:
|
||||
break
|
||||
reslist = client.list_discovered_resources(resourceType=item['resourceType'], nextToken=nextToken)
|
||||
|
|
Loading…
Reference in New Issue