{% set config = merged_configs.get('google_compute_router', {}) %}
# Compliance: {{ compliance_comments.get('google_compute_router', []) | join(', ') }}
resource "google_compute_router" "main" {
  name    = "{{ config.get('name', '${var.project_id}-router') }}"
  project = var.project_id
  region  = var.region
  network = google_compute_network.main.id

  bgp {
    asn               = {{ config.get('bgp_asn', 64514) }}
    advertise_mode    = "{{ config.get('advertise_mode', 'DEFAULT') }}"
  }
}
