{% set config = merged_configs.get('google_sql_database', {}) %}
# Compliance: {{ compliance_comments.get('google_sql_database', []) | join(', ') }}
resource "google_sql_database" "main" {
  name     = "{{ config.get('name', '${var.project_id}-db') }}"
  project  = var.project_id
  instance = google_sql_database_instance.main.name

  charset   = "{{ config.get('charset', 'UTF8') }}"
  collation = "{{ config.get('collation', 'en_US.UTF8') }}"

  deletion_policy = "{{ config.get('deletion_policy', 'ABANDON') }}"
}
