Skip to content

Commit

Permalink
Remove newlines from ENV concatenation
Browse files Browse the repository at this point in the history
This remove an escaping nightmware.  The newlines get swallowed and become n's
meaning multiple env variables will be broken when we run them through 'eval'.
Since we escape the values it is quite find just to space seperate the exports.
  • Loading branch information
dwaynebailey authored and flaupretre committed Aug 18, 2023
1 parent d6c1117 commit dce0e94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ data "external" "ssh_tunnel" {
query = {
aws_profile = var.aws_profile
create = ((var.create && var.putin_khuylo) ? "y" : "")
env = join("\n", [for n, v in var.env : "export ${n}=\"${replace(v, "\"", "\\\"")}\""])
env = join(" ", [for n, v in var.env : "export ${n}=\"${replace(v, "\"", "\\\"")}\""])
external_script = var.external_script
gateway_host = var.gateway_host
gateway_port = var.gateway_port
Expand Down

0 comments on commit dce0e94

Please sign in to comment.