Server-side auto-creation
Overrides can be created automatically by the Datadog server in two scenarios:
- Membership change: When an organization is moved into an org group, the server compares the org's current config to non-
GROUP_MANAGED policies. Mismatches trigger auto-created overrides. - Policy update: When a policy is created or updated, the server creates overrides for any member organizations whose configuration does not match the new policy value.
Auto-created overrides are indistinguishable from user-declared ones. You can manage them via terraform import or by using the datadog_org_group_policy_overrides data source.
Delete behavior
Warning: Removing a datadog_org_group_policy_override resource from your Terraform code will cause the target organization's configuration to be reset to match the parent policy's value. The server treats deletion as a command to re-apply the parent policy.
Best Practice: If you want to stop managing an override via Terraform without resetting the organization's value, use terraform state rm instead of deleting the resource block.
GROUP_MANAGED tier cascade
If a parent datadog_org_group_policy is changed to enforcement_tier = "GROUP_MANAGED", the server automatically deletes all overrides for that policy.
Migration Tip: If you plan to transition a policy to GROUP_MANAGED, you must remove all associated datadog_org_group_policy_override resource blocks in the same Terraform commit to avoid FailedPrecondition errors during the next apply.