get_run_details up to testable state

This commit is contained in:
worm 2022-12-30 16:06:15 -08:00
parent 5f836c35f2
commit 5bb1c35783

12
tfc-api-functions.js Normal file
View file

@ -0,0 +1,12 @@
import axios from 'axios';
// This will use the TFC get run details API, and return the response
// https://developer.hashicorp.com/terraform/cloud-docs/api-docs/run#get-run-details
export const get_run_details = async (base_url, run_id, token) => {
const response = await axios.get(
`${base_url}/api/v2/runs/${run_id}`,
{
headers: {Authorization :`Bearer ${token}`},
}
);
};