diff --git a/src/ALZ/Private/Config-Helpers/Write-TfvarsJsonFile.ps1 b/src/ALZ/Private/Config-Helpers/Write-TfvarsJsonFile.ps1 index f68f8e27..5037bd33 100644 --- a/src/ALZ/Private/Config-Helpers/Write-TfvarsJsonFile.ps1 +++ b/src/ALZ/Private/Config-Helpers/Write-TfvarsJsonFile.ps1 @@ -19,7 +19,7 @@ function Write-TfvarsJsonFile { foreach($configurationProperty in $configuration.PSObject.Properties | Sort-Object Name) { $configurationValue = $configurationProperty.Value.Value - if($configurationValue -eq "sourced-from-env") { + if($configurationValue.ToString() -eq "sourced-from-env") { continue } @@ -27,10 +27,11 @@ function Write-TfvarsJsonFile { $configurationValue = [System.IO.Path]::GetFileName($configurationValue) } - $jsonObject["$($configurationProperty.Name)"] = $configurationValue + Write-Verbose "Writing to tfvars.json - Configuration Property: $($configurationProperty.Name) - Configuration Value: $configurationValue" + $jsonObject.Add("$($configurationProperty.Name)", $configurationValue) } $jsonString = ConvertTo-Json $jsonObject -Depth 100 $jsonString | Out-File $tfvarsFilePath } -} \ No newline at end of file +} diff --git a/src/ALZ/Private/Deploy-Accelerator-Helpers/New-Bootstrap.ps1 b/src/ALZ/Private/Deploy-Accelerator-Helpers/New-Bootstrap.ps1 index 2184200b..e52203a5 100644 --- a/src/ALZ/Private/Deploy-Accelerator-Helpers/New-Bootstrap.ps1 +++ b/src/ALZ/Private/Deploy-Accelerator-Helpers/New-Bootstrap.ps1 @@ -135,6 +135,8 @@ function New-Bootstrap { -inputConfig $inputConfig ` -copyEnvVarToConfig + Write-Verbose "Final Starter Parameters: $(ConvertTo-Json $starterParameters -Depth 100)" + # Creating the tfvars files for the bootstrap and starter module $tfVarsFileName = "terraform.tfvars.json" $bootstrapTfvarsPath = Join-Path -Path $bootstrapModulePath -ChildPath $tfVarsFileName