diff --git a/main.tf b/main.tf index 42de3c1..363c961 100644 --- a/main.tf +++ b/main.tf @@ -33,7 +33,8 @@ resource "null_resource" "default" { ) : "", try(length(each.value["note"]["text"]), 0) > 0 || length(var.note_suffix) > 0 ? format( "--note Text=\"%s%s\",UpdatedBy=\"%s\"", - replace(each.value["note"]["text"], "\"", "'"), + # escape commas and escape double quotations + replace(replace(each.value["note"]["text"], ",", "\\,"), "\"", "'"), var.note_suffix, coalesce(each.value["note"]["updated_by"], var.default_note_updated_by) ) : "", @@ -80,4 +81,4 @@ resource "null_resource" "default" { # output "result" { # value = module.current_desired_capacity -# } \ No newline at end of file +# }