Skip to content

Reference catalogs

Section 13 · From docs/INVENTORY_INTERNALS.md on GitHub

Reference data lives in YAML under cloudg/inventory/catalogs/, loaded by load_catalog(name) (cached per process):

File Keys Used by
aws_cloudcontrol.yaml covered_types (mapping of group → CloudFormation types a deep collector already covers), global_prefixes (types listed once per account), asset_types (CloudFormation type → AssetType), sensitive_fields (type → top-level properties to drop) Cloud Control sweep
aws_arn_types.yaml arn_types (service:resource-type or service → AssetType) asset_type_from_arn (Tagging API and Cloud Control hits)
azure_arm_types.yaml arm_types (lower-case ARM type → AssetType) asset_type_from_arm
gcp_asset_types.yaml base (standard collector), deep (inventory, overrides base) GCP collectors

Overlays: put a file with the same name in $CLOUDG_CATALOG_DIR; mappings merge key by key (recursively), lists are extended without duplicates. AssetType names are validated by asset_type_map() at import time, so a typo fails loudly with the catalog, key and value. Because catalogs are read when the modules are imported, set $CLOUDG_CATALOG_DIR before importing cloudg.

When you add a deep collector for a resource type that Cloud Control also lists, add the type to covered_types so the sweep skips it.