Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulling Health information from a given workspace in Terraform Cloud #687

Open
astanfel opened this issue Apr 24, 2023 · 6 comments
Open

Comments

@astanfel
Copy link

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.

@mnedelko
Copy link

We are encountering the same use case. Please make this available.

@brandonc
Copy link
Collaborator

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 ?

@c4po
Copy link

c4po commented Feb 8, 2024

I think the API does exist now assessment-results.

@astanfel astanfel closed this as completed Jun 1, 2024
@astanfel
Copy link
Author

astanfel commented Jun 1, 2024

Thanks for the API doc. This gives me what I am looking for.

@c4po
Copy link

c4po commented Jun 10, 2024

@astanfel how you get the assessment_result_id? I don't see it return from the workspace

@astanfel
Copy link
Author

@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.

@astanfel astanfel reopened this Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants