I'm trying to use replace() to replace two forward slashes '//' with a single slash '/'.
However, if you wrap the 'search' argument in forward slashes, it treats it as a regex.
This is a problem because I'm trying to use '//' as the value of the search argument, as a literal.
If I try and escape it using backslashes, eg. '\/\/', I get an 'illegal char escape' error.
Is there a workaround? I don't like the fact that terraform automatically assumes regex based on the content, rather than letting me specify 'true' as a fourth argument for regex parsing or something similar.
Thanks,
-Ethan
path_prefix = "${replace(concat(var.consul_prefix, "/"), "//", "/")}${var.nlog_config_name}/"