Answers for "terraform for loop json"

0

terraform for 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
}
Posted by: Guest on May-05-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language