Drift management (preview)
This document aims to explain what drift is and what is supported by Coral currently. As this feature matures it will become possible to manage changes at scale.
What is drift
In Coral terms, a resource is deemed as drifted when the expected state of that resource differ from the actual state. Coral keeps an index of the resources as they were when created through Coral. This means that the declaration of the resource can change in the template as it evolves, but also that the resource Coral created can be changed through an external system, such as for instance Azure DevOps.
When a template evolves and a resource changes, it is, in Coral terms called internal drift.
When a resource changes through an external system, it is called external drift.
Internal drift
Internal drift is when changes occur in a template which already has been used to create groups of resources, such as software delivery pipeline resources. The template can change in the following ways:
- Namespaces can be added and removed
- Namespace identifers and schema can change.
- Artifacts can be added, removed or changed.
- Resources can be added, removed or changed.
- Parameters can be added, removed or changed.
External drift
External drift happens when a resource changes through a system which is external to Coral.
An example of external drift would be if someone with the appropriate permissions goes and changes a branch policy on a repository in Azure DevOps which was created through Coral.
Current support in Coral
Coral has two aspects to drift support. The core support and the vendor support.
Core support
At its core Coral currently has support for detecting drift for all existing resources and calling them to make the correct updates. It does not support changing the identifier of these resources, though.
No adds or removes are supported for resources, artifacts, parameters or namespaces.
Vendor support
The only resource that currently support updates are the Vsts (Azure DevOps) policy resources which Coral understands.