{% set config = merged_configs.get('google_secret_manager_secret', {}) %}
# Compliance: {{ compliance_comments.get('google_secret_manager_secret', []) | join(', ') }}
resource "google_secret_manager_secret" "main" {
  secret_id = "{{ config.get('secret_id', '${var.project_id}-secret') }}"
  project   = var.project_id

  replication {
    auto {}
  }
{% if config.get('rotation_period') %}

  rotation {
    rotation_period = "{{ config.get('rotation_period') }}"
  }
{% endif %}

  labels = {
    managed_by = "complyform"
  }
}
