From 2206c8584fc17394ad5977d8d81ef8cd46cbb2c3 Mon Sep 17 00:00:00 2001 From: Yash Ravindra Bhokare Date: Thu, 19 Dec 2024 15:25:19 -0500 Subject: [PATCH] v1.0.8-hotfix --- scripts/onboarding-helper/terraform-onboarding.ps1 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/onboarding-helper/terraform-onboarding.ps1 b/scripts/onboarding-helper/terraform-onboarding.ps1 index a2e886f..d239667 100644 --- a/scripts/onboarding-helper/terraform-onboarding.ps1 +++ b/scripts/onboarding-helper/terraform-onboarding.ps1 @@ -917,10 +917,18 @@ try { # Import terraform resources into state Import-ResourcesToState - # Export terraform resources - # Add -no-color to disable output with coloring + # Save the current console output encoding + $prev = [Console]::OutputEncoding + + # Set the console output encoding to UTF-8 + [Console]::OutputEncoding = [System.Text.UTF8Encoding]::new() + + # Run terraform show command and output to resource.tf file. Add -no-color to disable output with coloring terraform show -no-color >> ".\resource.tf" + # Restore the previous console output encoding + [Console]::OutputEncoding = $prev + # Post-process citrix.tf output PostProcessProviderConfig