{% for policy in resources -%}
resource "aws_iam_policy" "policy_{{ policy.PolicyName | replace('-', '_') | lower }}" {
  name        = "{{ policy.PolicyName }}"
  path        = "{{ policy.Path }}"
  description = "{{ policy.Description | default('') }}"

  policy      = <<POLICY
{{ policy.PolicyDocument }}
POLICY
}
{% endfor %}