Skip to content

Commit

Permalink
test change
Browse files Browse the repository at this point in the history
  • Loading branch information
id27182 committed Nov 8, 2024
1 parent 39a156e commit 0763feb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/test-tf-plan.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ if (Test-Path $tfPlanPath) {

# Convert execution plan to json
$tfPlanJsonPath = "tfPlan.json"
try {
# try {
Write-Output "Runnint terraform init..."
terraform init
Write-Output "Runnint terraform show..."
terraform show -json "$tfPlanPath" > "$tfPlanJsonPath"
} catch {
throw "`u{1F635} Unexpected error: unable to read terraform plan file. Please contact your course mentor. "
}

# } catch {
# throw "`u{1F635} Unexpected error: unable to read terraform plan file. Please contact your course mentor. "
# }

$plan = (Get-Content -Path $tfPlanJsonPath | ConvertFrom-Json)

Write-Output "Readinig execution plan..."
Get-Content -Path $tfPlanJsonPath
$plan

Expand Down

0 comments on commit 0763feb

Please sign in to comment.