From 47d7354cc5521853fbe8df96b7bb0223bea732cd Mon Sep 17 00:00:00 2001 From: Kyle Kotowick Date: Fri, 30 Jul 2021 12:49:09 -0400 Subject: [PATCH] Use a fake function to throw the error --- README.md | 6 +++++- main.tf | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3864de3..4649d15 100644 --- a/README.md +++ b/README.md @@ -24,5 +24,9 @@ No changes. Your infrastructure matches the configuration. Output on Windows machines: ``` -Invalid value for "number" parameter: cannot parse "ERROR: This Terraform configuration can only be run on Unix-based machines." as a base 2 integer. +// This is where you see the real error message +var.error_message is "This Terraform configuration can only be run on Unix-based machines." + +// Ignore this part +There is no function named "SEE_ABOVE_ERROR_MESSAGE". ``` diff --git a/main.tf b/main.tf index 3d8931a..0ab7d4c 100644 --- a/main.tf +++ b/main.tf @@ -3,5 +3,5 @@ terraform { } locals { - content = var.condition ? "" : abs(true ? null : "ERROR: ${var.error_message}") + content = var.condition ? "" : SEE_ABOVE_ERROR_MESSAGE(true ? null : "ERROR: ${var.error_message}") }