From c4a3069723ef409287540e350a3c2fd6106e217a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Sodr=C3=A9?= Date: Sat, 2 Jan 2021 21:54:49 -0500 Subject: [PATCH 1/2] Remove type in examples/complete --- examples/complete/main.tf | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 871a85e..3ef933d 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -11,17 +11,16 @@ module "encrypt" { public_key_pem = tls_private_key.this.public_key_pem content_base64 = base64encode(random_password.this.result) - x = file } output "generated" { description = "The random generated password." - value = random_password.this.result + value = random_password.this.result } output "decrypted" { description = "The same random password after it was encrypted and then decrypted." - value = rsadecrypt(module.encrypt.result, tls_private_key.this.private_key_pem) + value = rsadecrypt(module.encrypt.result, tls_private_key.this.private_key_pem) } From ded3d6ae54a026e2c22e3cbe41a2c059ce6328a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Sodr=C3=A9?= Date: Sat, 2 Jan 2021 22:05:48 -0500 Subject: [PATCH 2/2] Reformat code --- main.tf | 2 +- outputs.tf | 2 +- variables.tf | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main.tf b/main.tf index dd75081..9704514 100644 --- a/main.tf +++ b/main.tf @@ -1,5 +1,5 @@ module "encrypt" { - source = "matti/resource/shell" + source = "matti/resource/shell" version = "1.1.0" environment = { PUBLIC_KEY_PEM = var.public_key_pem diff --git a/outputs.tf b/outputs.tf index 5a84500..fd8a09d 100644 --- a/outputs.tf +++ b/outputs.tf @@ -1,4 +1,4 @@ output "result" { description = "Encrypted content in Base64-encoded format." - value = [module.encrypt.stdout][module.encrypt.exitstatus] + value = [module.encrypt.stdout][module.encrypt.exitstatus] } diff --git a/variables.tf b/variables.tf index 32e8253..542e75c 100644 --- a/variables.tf +++ b/variables.tf @@ -1,9 +1,9 @@ variable "public_key_pem" { - type = string + type = string description = "The RSA public key to use for encryption." } variable "content_base64" { - type = string + type = string description = "Base64-encoded data to be encrypted." }