Skip to main content
Version: 0.6.0

Assessment Results

An Assessment Result records the outcome of a workspace health assessment (drift detection). Terraform Cloud periodically checks whether the actual infrastructure matches the expected state and records the result here.

Available Queries

QueryDescription
assessmentResults(workspaceId: ID!, filter: AssessmentResultFilter)List results for a workspace
assessmentResult(id: ID!)Fetch a single result by ID

Example

Find workspaces with detected drift:

query DriftedWorkspaces {
workspaces(includeOrgs: ["my-org"], filter: { assessmentsEnabled: { _eq: true } }) {
name
lastAssessmentResultAt
}
}

Get detailed assessment history for a workspace:

query AssessmentHistory($wsId: ID!) {
assessmentResults(workspaceId: $wsId, filter: { drifted: { _eq: true } }) {
id
drifted
succeeded
errorMessage
createdAt
}
}

Fields

FieldTypeDescription
idID!Assessment result identifier
driftedBoolean!Whether drift was detected
succeededBoolean!Whether the assessment completed without errors
errorMessageStringError message if the assessment failed
createdAtDateTime!When the assessment was performed

Filter Fields

FieldComparison Type
idStringComparisonExp
driftedBooleanComparisonExp
succeededBooleanComparisonExp
errorMessageStringComparisonExp
createdAtDateTimeComparisonExp
  • Workspaces — Parent workspace for the assessment