Drift Detection
Advanced Filtering for Drift Detection
Drift Detection now supports advanced filtering. This makes it easy to detect drift only in the areas that need it, while excluding parts of your infrastructure where drift is either expected or common. This avoids unnecessary work and helps your team build confidence in resolving the drift that matters.
The filter parameter accepts a comma-separated list of paths to be included when checking for drift. For example, to perform drift detection exclusively within your management account, you might supply the management/** filter. The filter can be combined with the Ignore List (which uses the same syntax) to further limit the units that are checked for drift.
To add a drift detection filter:
- GitHub users can add this filter as a workflow parameter for manual runs, or by supplying a
defaultto thepipelines_drift_detection_filterinput parameter in your.github/workflows/pipelines-drift-detection.ymlfile for scheduled runs. - GitLab customers can supply the filter to the
pipelines_drift_detection_filterinput of their pipeline for both manual and scheduled runs.
Advanced drift detection filters are available now with the GitHub v4 and GitLab v2 releases, which you can update to following our migration guides ( GitHub guide) ( GitLab guide). See the filter documentation for additional details.