go-tfe
go-tfe copied to clipboard
Pulling Health information from a given workspace in Terraform Cloud
Requesting a feature for being able to pull health information from the workspaces API for a given workspace. I have a use-case where in a would like to call the API to identify workspaces that have had drift since the last health assessment ran for a given workspace to run refresh only plans in an automated fashion to sync the resources within the state.
We are encountering the same use case. Please make this available.
Hello, thanks for the input. The purpose of this repository is to provide a go interface to interact with the Terraform Cloud API as it currently exists and does not really define the API itself.
To clarify, are you asking for a new API filtering capability on workspaces? Perhaps a way to filter them by last-assessment-result-at ?
I think the API does exist now assessment-results.
Thanks for the API doc. This gives me what I am looking for.
@astanfel how you get the assessment_result_id? I don't see it return from the workspace
@c4po you are correct, there still doesn't seem to be a programatic way to link the assessment_result_id back to a given workspace.
@brandonc Essentially what I would like to do it to gather all of my workspaces in my account and iterate through them pulling the latest health assessment results for reporting. So while it looks like the API is present, the link back to the workspace is not.