--- azure.azcollection.*: query: >- ( {"apimanagement": "Metadata", "authorization": "Governance & Operations", "automation": "Governance & Operations", "batch": "Event Generation", "cache": "Database", "cdn": "Networking", "classiccompute": "Compute", "compute": "Compute", "containerinstance": "Compute", "containerregistry": "DevOps", "containerservice": "Compute", "datafactory": "Storage", "dbformariadb": "Database", "dbformysql": "Database", "dbforpostgresql": "Database", "devices": "Hybrid/Edge Cloud Components", "documentdb": "Database", "eventhub": "Data Processing & Analytics", "hdinsight": "Data Processing & Analytics", "insights": "Data Processing & Analytics", "keyvault": "Database", "maintenance": "Governance & Operations", "managedidentity": "Governance & Operations", "managedservices": "Governance & Operations", "management": "Governance & Operations", "network": "Networking", "operationalinsights": "Data Processing & Analytics", "recoveryservices": "Storage", "redhatopenshift": "Compute", "resources": "UNKNOWN", "servicebus": "App Integration & Messaging", "sql": "Database", "storage": "Storage", "web": "App Integration & Messaging" } as $mapping | (.aks_agent_pools // .ansible_facts.azure_vm // .ansible_facts.azure_vmss // .bastion_host // .connection // .database // .deployment // .elastic_pool // .firewall_policy // .firewall_rule // .instances // .ip_security_restrictions // .link_service // .long_term_retention_policy // .response // .state // .short_term_retention_policy // .) | (if type=="array" then .[] else if type=="object" then . else empty end end ) as $data | ( ($data.id | capture("/providers/[Mm]icrosoft.(?[^/]+)/")? | .resourcetype) | ascii_downcase ) as $node_type | ( ($data.id | capture("/providers/[Mm]icrosoft.[^/]+/(?[^/]+)/")? | .subtype) | ascii_downcase ) as $sub_node_type | select($data.id != null) | { name: $data.id, canonical_facts: { name: ($data.name // "UNKNOWN"), id: $data.id, node_type: $node_type }, facts: { infra_type: "PublicCloud", infra_bucket: ($mapping[$node_type] // "UNKNOWN"), device_type: $sub_node_type } } )