TF12 - muliple outputs for resources created options with for_each

I think this will do what you wanted, if I understood correctly:

resource "aws_ssm_parameter" "dd_external_id" {
  for_each = datadog_integration_aws.full_integration

  name  = "/dd_external_ids/${each.key}"
  type  = "String"
  value = each.value.external_id
}

This is resource for_each.

1 Like