{% set config = merged_configs.get('aws_db_subnet_group', {}) %}
{% set comments = compliance_comments.get('aws_db_subnet_group', []) %}
# ------------------------------------------------------------------------------
# RDS DB Subnet Group
# ------------------------------------------------------------------------------
{% for comment in comments %}
# {{ comment }}
{% endfor %}

resource "aws_db_subnet_group" "this" {
  name        = "{{ config.get('name', project_id ~ '-db-subnet-group') }}"
  description = "{{ config.get('description', 'Database subnet group managed by ComplyForm') }}"
  subnet_ids  = {{ config.get('subnet_ids', '[]') }}

  tags = {
    Name      = "{{ config.get('name', project_id ~ '-db-subnet-group') }}"
    ManagedBy = "complyform"
  }
}
