{% set config = merged_configs.get('google_pubsub_topic', {}) %}
# Compliance: {{ compliance_comments.get('google_pubsub_topic', []) | join(', ') }}
resource "google_pubsub_topic" "main" {
  name    = "{{ config.get('name', '${var.project_id}-topic') }}"
  project = var.project_id
{% if config.get('kms_key_name') %}

  kms_key_name = {{ config.get('kms_key_name') }}
{% endif %}

  message_retention_duration = "{{ config.get('message_retention_duration', '604800s') }}"
}
