Created
June 2, 2020 05:34
-
-
Save gsscoder/8ef5c17f5f95e296d690f7514a1375d0 to your computer and use it in GitHub Desktop.
PowerShell script to list Terraform Cloud runs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$token = '*************YOUR****TOKEN******HERE******************************************************' | |
$workspaceId = 'ws-bbaGwqP1yANww4va' | |
$response = Invoke-WebRequest -Uri "https://app.terraform.io/api/v2/workspaces/$workspaceId/runs" ` | |
-Method Get ` | |
-ContentType 'application/vnd.api+json' ` | |
-Headers @{ | |
Authorization = "Bearer $token" | |
} ` | |
-UseBasicParsing | |
$response | Write-Host |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment