{% set config = merged_configs.get('google_alloydb_instance', {}) %}
# Compliance: {{ compliance_comments.get('google_alloydb_instance', []) | join(', ') }}
resource "google_alloydb_instance" "main" {
  cluster       = google_alloydb_cluster.main.name
  instance_id   = "{{ config.get('instance_id', 'primary') }}"
  instance_type = "{{ config.get('instance_type', 'PRIMARY') }}"

  machine_config {
    cpu_count = {{ config.get('cpu_count', 2) }}
  }

  availability_type = "{{ config.get('availability_type', 'REGIONAL') }}"
}
