Archiving entities automatically

Cortex automatically archives entities when they're no longer detected in your integrations, so your catalog stays in sync as entities come and go. For example, if AWS auto-hydrates your catalog, enabling auto-archive will archive any entities that are later deleted from AWS.

This article covers how auto-archival works and how to configure it.

circle-check

Cortex checks every day at 7 a.m. UTC for any affected entities, and skips archiving if any errors are detected.

Enabling auto-archive of entities

Users with the Edit Settings permission can enable the auto-archive entities feature.

  1. From the main sidebar, click your avatar in the bottom-left corner.

  2. Click Settings.

  3. From the Settings menu, locate the Workspace section, then click Entities.

  4. Click General.

    The 'General' tab within Cortex settings.
  5. On the General page, scroll to the Auto-archiving entities by type section.

  6. Toggle on one or both of the following:

    • Enable integration-based auto-archiving for new entity types by default

      • Toggle on this setting if you want to enable the feature for integration-based archiving. Cortex automatically archives and unarchives entities based on their existence in a third-party integration.

      • Cortex checks for a deleted or archived repo in your integration. To prevent an entity from being unarchived, make sure you have deleted the associated repo. The entity is removed the next time the archival sync runs.

      • This option is recommended if you use microservices that all live in different repos.

    • Enable GitOps based auto-archiving for new entity types by default

      • Toggle on this setting if you want to enable the feature for GitOps-based archiving. Cortex automatically archives entities if their corresponding YAML file is deleted.

      • If the file is moved rather than deleted, it is not archived from Cortex. Cortex checks for files that have been deleted.

      • This option is recommended if you use a monorepo.

    The options to enable auto-archiving in Cortex.
circle-info

An entity's x-cortex-tag cannot be overwritten; attempting to update the x-cortex-tag value via GitOps creates a new entity. The entity only automatically archives if its original YAML file no longer exists in your Git environment.

To change an entity's x-cortex-tag, you must archive or delete the entity, then create a new entity with the desired tag.

Enabling auto-archive per entity type

Users with the Edit Settings permission can enable auto-archive per entity type.

Below the auto-archive setting, each entity type (default and custom) is listed with its own toggle, so you can enable auto-archival selectively per type.

Enable auto archive per entity type.

Triggering an entity sync

Users need the Edit Catalog permission, combined with either:

  • Edit Domains, Edit Teams, or Edit Services (depending on the entity type being archived), OR

  • Edit All Catalog, which covers every entity type.

Deleted entities appear in the Entities list until the next time the auto-archival sync runs. You can also manually trigger the sync.

  1. From the main sidebar, expand Catalogs, then select All entities.

  2. In the upper right corner, click Import entities.

  3. Select Import discovered entities.

  4. Select an integration. The Select entities to import window opens.

  5. Click Sync entities.

Troubleshooting and FAQ

Why is an entity unexpectedly re-appearing after it's been archived?

If you are using the integration-based auto-archiving, Cortex is checking whether the entity exists in your third-party integration. When Cortex runs the background sync for entity discovery, if the repo connected to that entity still exists, Cortex will un-archive the entity. To prevent un-archival, you can either delete the associated repo, or you can use the GitOps-based auto-archiving instead.

Why is an entity still appearing after I deleted the YAML file for it or deleted the associated repo?

The auto-archival feature runs once a day at 7 a.m. UTC. The entity appears until the next time the auto-archival sync runs or until you manually trigger the sync.

Last updated

Was this helpful?