Skip to content

Instantly share code, notes, and snippets.

@kevincloud
Last active July 20, 2020 03:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kevincloud/59ce842668d99c8bd6d70cdc9bcd90e8 to your computer and use it in GitHub Desktop.
Save kevincloud/59ce842668d99c8bd6d70cdc9bcd90e8 to your computer and use it in GitHub Desktop.
def applyRun(runid) {
def response = httpRequest(
customHeaders: [
[ name: "Authorization", value: "Bearer " + env.BEARER_TOKEN ],
[ name: "Content-Type", value: "application/vnd.api+json" ]
],
httpMode: 'POST',
responseBody: '{ comment: "Apply confirmed" }',
url: "https://app.terraform.io/api/v2/runs/${runid}/actions/apply"
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment