Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: boolean true output issue #215

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/ALZ/Private/Config-Helpers/Write-TfvarsJsonFile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,19 @@ 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
}

if($configurationProperty.Value.Validator -eq "configuration_file_path") {
$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
}
}
}
2 changes: 2 additions & 0 deletions src/ALZ/Private/Deploy-Accelerator-Helpers/New-Bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading