Created
May 24, 2019 10:53
-
-
Save invidian/3a250ceaa5be47128c78ee362d8552fb to your computer and use it in GitHub Desktop.
Quality formatting improvement with terraform 0.12upgrade
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provisioner "file" { | |
@@ -115,96 +115,150 @@ Name = ${element(null_resource.server_names_tinc.*.triggers.name, count.index)} | |
Device = /dev/net/tun | |
AddressFamily = ipv4 | |
BindToAddress = ${element(hcloud_server.servers.*.ipv4_address, count.index)} | |
-${replace(join("\n", formatlist("ConnectTo = %s", split(" ", replace(replace(replace(replace(replace(replace(join(",", null_resource.server_names.*.triggers.name), element(null_resource.server_names.*.triggers.name, count.index), ""), ",,", ","), ".${var.domain}", ""), "-", "_"), ",", " "), "/(^ | $)/", "")))), "/^ConnectTo = $/", "")} | |
+${replace( | |
+join( | |
+"\n", | |
+formatlist( | |
+"ConnectTo = %s", | |
+split( | |
+" ", | |
+replace( | |
+replace( | |
+replace( | |
+replace( | |
+replace( | |
+replace( | |
+join(",", null_resource.server_names.*.triggers.name), | |
+element(null_resource.server_names.*.triggers.name, count.index), | |
+"", | |
+), | |
+",,", | |
+",", | |
+), | |
+".${var.domain}", | |
+"", | |
+), | |
+"-", | |
+"_", | |
+), | |
+",", | |
+" ", | |
+), | |
+"/(^ | $)/", | |
+"", | |
+), | |
+), | |
+), | |
+), | |
+"/^ConnectTo = $/", | |
+"", | |
+)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment