{% set config = merged_configs.get('google_firestore_database', {}) %}
# Compliance: {{ compliance_comments.get('google_firestore_database', []) | join(', ') }}
resource "google_firestore_database" "main" {
  name        = "{{ config.get('name', '(default)') }}"
  project     = var.project_id
  location_id = "{{ config.get('location_id', var.region) }}"
  type        = "{{ config.get('type', 'FIRESTORE_NATIVE') }}"

  concurrency_mode            = "{{ config.get('concurrency_mode', 'PESSIMISTIC') }}"
  point_in_time_recovery_enablement = "{{ config.get('point_in_time_recovery', 'POINT_IN_TIME_RECOVERY_ENABLED') }}"
  delete_protection_state     = "{{ config.get('delete_protection_state', 'DELETE_PROTECTION_ENABLED') }}"
}
