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 a1f0b99 commit 39a156e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tests/test-tf-plan.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ if (Test-Path $tfPlanPath) {
throw "`u{1F635} Unable to find terraform plan file. Please make sure that you saved terraform execution plan to the file and try again. "
}

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

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

Expand Down

0 comments on commit 39a156e

Please sign in to comment.