Problem
When attempting to start a new health assessment from a workspace's Health page in HCP Terraform, the operation fails with a 404 Payload error.
The UI displays the following error message:
Error: Ember Data Request POST /api/v2/workspaces/ws-...../actions/assess returned a 404 Payload (application/vnd.api+json; charset=utf-8) [object Object]
Prerequisites
- An HCP Terraform account with access to workspaces.
- The Health Assessment feature enabled.
Cause
The 404 error indicates that the user initiating the on-demand health assessment does not have the required permissions. Only users with organization owner permissions are authorized to perform this action.
For security purposes, the API returns a 404 Not Found error instead of a 403 Forbidden error. This common API practice prevents disclosing the existence of an endpoint to users without the proper permissions.
Solution
To resolve this issue, an organization owner must trigger the on-demand health assessment. Ensure that the user performing this action has been granted owner permissions for the organization.
General Information on Health Assessments
- The time to complete an assessment can vary based on network latency and the number of resources managed by the workspace.
- When health assessments are enabled on multiple workspaces, assessments may run concurrently and do not affect the workspace's concurrency limit for runs.
- HCP Terraform sends notifications about health assessment results according to the workspace’s settings.