Terraform für Loop JSON

locals {
    json_files = fileset("../ses_templates/*.JSON")   
    json_data  = [ for f in local.json_files : jsondecode(file("${path.module}/${f}")) ]  
}

resource "aws_ses_template" "template" {
    for_each = { for f in local.json_data : f.name => f }
    name     = each.value.name
    subject  = each.value.subject
    html     = each.value.html
    text     = each.value.text
}
Adham Abu Dari