Skip to content

Commit

Permalink
Update code
Browse files Browse the repository at this point in the history
  • Loading branch information
craigthackerx committed Feb 13, 2024
1 parent 40c09e1 commit 56fc75c
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/tf-apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,34 @@ jobs:
id: run-script
shell: pwsh
run: |
function Convert-ToBoolean($value)
{
$valueLower = $value.ToLower()
if ($valueLower -eq "true")
{
return $true
}
elseif ($valueLower -eq "false")
{
return $false
}
else
{
throw "[$( $MyInvocation.MyCommand.Name )] Error: Invalid value - $value. Exiting."
exit 1
}
}
$DebugMode = Convert-ToBoolean ${{ inputs.enable_debug_mode }}
.\Run-AzTerraform.ps1 `
-TerraformCodeLocation ${{ inputs.terraform_code_location }} `
-RunTerraformInit true `
-RunTerraformPlan true `
-RunTerraformPlanDestroy false `
-RunTerraformApply false `
-RunTerraformDestroy false `
-DebugMode ${{ inputs.enable_debug_mode }} `
-DebugMode $DebugMode `
-RunTfsec ${{ inputs.run_tfsec }} `
-RunCheckov ${{ inputs.run_checkov }} `
-RunTerraformCompliance ${{ inputs.run_terraform_compliance }} `
Expand Down

0 comments on commit 56fc75c

Please sign in to comment.