{% set config = merged_configs.get('aws_s3_bucket_versioning', {}) %}
{% set comments = compliance_comments.get('aws_s3_bucket_versioning', []) %}
# ------------------------------------------------------------------------------
# S3 Bucket Versioning
# ------------------------------------------------------------------------------
{% for comment in comments %}
# {{ comment }}
{% endfor %}

resource "aws_s3_bucket_versioning" "this" {
  bucket = aws_s3_bucket.this.id

  versioning_configuration {
    status = "{{ config.get('status', 'Enabled') }}"
  }
}
