# Control Center Policy Engine Configuration Fragment

[[elements]]
border_bottom = false
border_top = true
name = "policy_section_header"
title = "📋 Policy Engine Configuration"
type = "section_header"

[[elements]]
default = true
help = "Enable policy engine"
name = "policy_enabled"
nickel_path = ["policy", "enabled"]
prompt = "Enable Policy Engine"
type = "confirm"

[[elements]]
condition = "policy_enabled == true"
default = true
help = "Enable policy caching"
name = "policy_cache_enabled"
nickel_path = ["policy", "cache", "enabled"]
prompt = "Enable Policy Caching"
type = "confirm"

[[elements]]
condition = "policy_enabled == true && policy_cache_enabled == true"
default = 3600
help = "Policy cache TTL in seconds (range: 60-86400)"
max = 86400
min = 60
name = "policy_cache_ttl"
nickel_path = ["policy", "cache", "ttl"]
prompt = "Cache TTL (seconds)"
type = "number"

[[elements]]
condition = "policy_enabled == true && policy_cache_enabled == true"
default = 10000
help = "Maximum policies to keep in cache (range: 100-1000000)"
max = 1000000
min = 100
name = "policy_cache_max_policies"
nickel_path = ["policy", "cache", "max_policies"]
prompt = "Max Cached Policies"
type = "number"

[[elements]]
condition = "policy_enabled == true"
default = true
help = "Enable policy versioning"
name = "policy_versioning_enabled"
nickel_path = ["policy", "versioning", "enabled"]
prompt = "Enable Policy Versioning"
type = "confirm"

[[elements]]
condition = "policy_enabled == true && policy_versioning_enabled == true"
default = 20
help = "Maximum policy versions to keep (range: 1-1000)"
max = 1000
min = 1
name = "policy_versioning_max_versions"
nickel_path = ["policy", "versioning", "max_versions"]
prompt = "Max Policy Versions"
type = "number"
