New Drupal Module Makes Configuration UUIDs Deterministic Across Environments

New Drupal Module Makes Configuration UUIDs Deterministic Across Environments

A new Drupal module introduces a deterministic approach to configuration UUIDs, addressing a long-standing issue where randomly generated identifiers make configuration diffs and migration workflows difficult to manage. In a blog post on CodeLift, Niels de Feyter describes config_uuid_deterministic, a contributed module that generates stable UUIDs across environments without modifying Drupal core.

The module uses UUID version 5, a name-based scheme that produces consistent values for the same input. By deriving identifiers from configuration names and a fixed namespace, it ensures that configuration UUIDs remain identical across local development environments, CI pipelines, and fresh installations.

To implement this behaviour, the module decorates Drupal’s configuration storage layer, including config.storage.active and config.storage.sync. This allows it to intercept read and write operations and apply deterministic UUIDs across workflows such as configuration import, module installation, and site installation.

The approach also accounts for edge cases in Drupal’s configuration system. Nested plugin structures, where UUIDs appear both as keys and values, are remapped using stable path-based inputs to maintain consistency. The module further includes safeguards for field storage configuration, where UUID changes can affect hashed database table names and lead to missing data if not handled correctly.

The full implementation, including edge case handling and development notes, is detailed in the original post on CodeLift. The module’s development repository is available on GitLab.

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please reach out to us at #thedroptimes channel on Drupal Slack and we will try to address the issue as best we can.

Related Organizations

Upcoming Events