From c56e18a7f5690c25eebe8a98bb34be3a239a4d13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Sodr=C3=A9?= Date: Wed, 6 Jan 2021 05:47:48 -0500 Subject: [PATCH] Implement --wrap=0 within terraform itself --- main.tf | 2 +- outputs.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 786cbfc..9e4d3d5 100644 --- a/main.tf +++ b/main.tf @@ -21,7 +21,7 @@ module "encrypt" { command = <<-EOF public_key_pem_file=$(mktemp) printenv PUBLIC_KEY_PEM > $public_key_pem_file - printenv CONTENT_B64 | base64 -d | openssl ${local.openssl_command[var.algorithm]} | base64 --wrap=0 + printenv CONTENT_B64 | base64 -d | openssl ${local.openssl_command[var.algorithm]} | base64 rm -f $public_key_file EOF } diff --git a/outputs.tf b/outputs.tf index 83f28a3..19f7603 100644 --- a/outputs.tf +++ b/outputs.tf @@ -1,4 +1,4 @@ output "result" { description = "The base64-encoded encrypted content." - value = [module.encrypt.stdout][module.encrypt.exitstatus] + value = [replace(module.encrypt.stdout, "\n", "")][module.encrypt.exitstatus] }