Skip to content

Commit 07aa74b

Browse files
authored
remove escape (#548)
Signed-off-by: 6za <53096417+6za@users.noreply.github.com> Signed-off-by: 6za <53096417+6za@users.noreply.github.com>
1 parent f9e333f commit 07aa74b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal/vault/vault.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"log"
99
"os"
1010
"os/exec"
11-
"strings"
1211
"syscall"
1312

1413
vault "github.com/hashicorp/vault/api"
@@ -101,10 +100,10 @@ func ConfigureVault(dryRun bool) {
101100
envs["TF_VAR_git_provider"] = viper.GetString("git.mode")
102101
//envs["TF_VAR_ssh_private_key"] = viper.GetString("botprivatekey")
103102
//Escaping newline to allow certs to be loaded properly by terraform
104-
envs["TF_VAR_ssh_private_key"] = strings.Replace(viper.GetString("botprivatekey"), "\n", "\\n", -1)
103+
envs["TF_VAR_ssh_private_key"] = viper.GetString("botprivatekey")
105104

106105
envs["TF_VAR_atlantis_repo_webhook_secret"] = viper.GetString("github.atlantis.webhook.secret")
107-
envs["TF_VAR_kubefirst_bot_ssh_public_key"] = strings.Replace(viper.GetString("botpublickey"), "\n", "\\n", -1)
106+
envs["TF_VAR_kubefirst_bot_ssh_public_key"] = viper.GetString("botpublickey")
108107

109108
directory := fmt.Sprintf("%s/gitops/terraform/vault", config.K1FolderPath)
110109
err = os.Chdir(directory)

0 commit comments

Comments
 (0)