Examples
To view and test the integration's mapping against examples of the third-party API responses, use the jq playground in your data sources page. Find the integration in the list of data sources and click on it to open the playground.
Organization
Organization blueprint (click to expand)
{
"identifier": "terraformCloudOrganization",
"description": "This blueprint represents an organization in Terraform Cloud",
"title": "Terraform Cloud Organization",
"icon": "Terraform",
"schema": {
"properties": {
"externalId": {
"type": "string",
"title": "External ID",
"description": "The external ID of the organization"
},
"ownerEmail": {
"type": "string",
"title": "Owner Email",
"description": "The email associated with the organization"
},
"collaboratorAuthPolicy": {
"type": "string",
"title": "Collaborator Authentication Policy",
"description": "Policy for collaborator authentication"
},
"planExpired": {
"type": "string",
"title": "Plan Expired",
"description": "Indicates if plan is expired"
},
"planExpiresAt": {
"type": "string",
"format": "date-time",
"title": "Plan Expiry Date",
"description": "The data and time which the plan expires"
},
"permissions": {
"type": "object",
"title": "Permissions",
"description": "Permissions associated with the organization"
},
"samlEnabled": {
"type": "boolean",
"title": "SAML Enabled",
"description": "Indicates if SAML is enabled for the organization"
},
"defaultExecutionMode": {
"type": "string",
"title": "Default Execution Mode",
"description": "The default execution mode for the organization"
}
}
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {}
}
Integration configuration (click to expand)
- kind: organization
selector:
query: "true"
port:
entity:
mappings:
identifier: .id
title: .attributes.name
blueprint: '"terraformCloudOrganization"'
properties:
externalId: .attributes."external-id"
ownerEmail: .attributes.email
collaboratorAuthPolicy: .attributes."collaborator-auth-policy"
planExpired: .attributes."plan-expired"
planExpiresAt: .attributes."plan-expires-at"
permissions: .attributes.permissions
samlEnabled: .attributes."saml-enabled"
defaultExecutionMode: .attributes."default-execution-mode"
Project
Project blueprint (click to expand)
{
"identifier": "terraformCloudProject",
"description": "This blueprint represents a project in Terraform Cloud",
"title": "Terraform Cloud Project",
"icon": "Terraform",
"schema": {
"properties": {
"name": {
"type": "string",
"title": "Project Name",
"description": "The name of the Terraform Cloud project"
},
"permissions": {
"type": "object",
"title": "Permissions",
"description": "The permissions on the project"
}
}
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {
"organization": {
"title": "Terraform Cloud Organization",
"target": "terraformCloudOrganization",
"required": true,
"many": false
}
}
}
Integration configuration (click to expand)
- kind: project
selector:
query: "true"
port:
entity:
mappings:
identifier: .id
title: .attributes.name
blueprint: '"terraformCloudProject"'
properties:
name: .attributes.name
permissions: .attributes.permissions
relations:
organization: .relationships.organization.data.id
Workspace
Workspace blueprint (click to expand)
{
"identifier": "terraformCloudWorkspace",
"description": "This blueprint represents a workspace in Terraform Cloud",
"title": "Terraform Cloud Workspace",
"icon": "Terraform",
"schema": {
"properties": {
"organization": {
"type": "string",
"title": "Organization",
"description": "The organization within which the workspace belongs to"
},
"createdAt": {
"type": "string",
"format": "date-time",
"title": "Creation Time",
"description": "The creation timestamp of the workspace"
},
"updatedAt": {
"type": "string",
"format": "date-time",
"title": "Last Updated",
"description": "The last update timestamp of the workspace"
},
"terraformVersion": {
"type": "string",
"title": "Terraform Cloud Version",
"description": "Version of Terraform cloud used by the workspace"
},
"locked": {
"type": "boolean",
"title": "Locked Status",
"description": "Indicates whether the workspace is locked"
},
"executionMode": {
"type": "string",
"title": "Execution Mode",
"description": "The execution mode of the workspace"
},
"resourceCount": {
"type": "number",
"title": "Resource Count",
"description": "Number of resources managed by the workspace"
},
"latestChangeAt": {
"type": "string",
"format": "date-time",
"title": "Latest Change",
"description": "Timestamp of the latest change in the workspace"
},
"tags": {
"type": "array",
"title": "Workspace Tags",
"description": "Terraform workspace tags"
}
}
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {
"currentStateVersion": {
"title": "Current State Version",
"target": "terraformCloudStateVersion",
"required": false,
"many": false
},
"project": {
"title": "Terraform Cloud Project",
"target": "terraformCloudProject",
"required": false,
"many": false
}
}
}
Integration configuration (click to expand)
- kind: workspace
selector:
query: "true"
port:
entity:
mappings:
identifier: .id
title: .attributes.name
blueprint: '"terraformCloudWorkspace"'
properties:
organization: .relationships.organization.data.id
createdAt: .attributes."created-at"
updatedAt: .attributes."updated-at"
terraformVersion: .attributes."terraform-version"
locked: .attributes.locked
executionMode: .attributes."execution-mode"
resourceCount: .attributes."resource-count"
latestChangeAt: .attributes."latest-change-at"
tags: .__tags
relations:
currentStateVersion: .relationships."current-state-version".data.id
project: .relationships.project.data.id
Run
Run blueprint (click to expand)
{
"identifier": "terraformCloudRun",
"description": "This blueprint represents a run in Terraform cloud",
"title": "Terraform Cloud Run",
"icon": "Terraform",
"schema": {
"properties": {
"createdAt": {
"type": "string",
"format": "date-time",
"title": "Creation Time",
"description": "The creation timestamp of the run"
},
"status": {
"type": "string",
"title": "Run Status",
"description": "The current status of the run"
},
"hasChanges": {
"type": "boolean",
"title": "Has Changes",
"description": "Indicates whether the run has changes"
},
"isDestroy": {
"type": "boolean",
"title": "Is Destroy",
"description": "Indicates whether the run is a destroy operation"
},
"message": {
"type": "string",
"title": "Run Message",
"description": "Message associated with the run"
},
"terraformVersion": {
"type": "string",
"title": "Terraform Cloud Version",
"description": "Version of Terraform cloud used in the run"
},
"appliedAt": {
"type": "string",
"format": "date-time",
"title": "Applied Time",
"description": "Timestamp when the run was applied"
},
"plannedAt": {
"type": "string",
"format": "date-time",
"title": "Planned Time",
"description": "Timestamp when the run was planned"
},
"source": {
"type": "string",
"title": "Run Source",
"description": "The source of the run initiation"
}
}
},
"relations": {
"terraformCloudWorkspace": {
"title": "Terraform Cloud Workspace",
"target": "terraformCloudWorkspace",
"required": false,
"many": false
}
}
}
Integration configuration (click to expand)
- kind: run
selector:
query: "true"
port:
entity:
mappings:
identifier: .id
title: .attributes.message
blueprint: '"terraformCloudRun"'
properties:
createdAt: .attributes."created-at"
status: .attributes.status
hasChanges: .attributes."has-changes"
isDestroy: .attributes."is-destroy"
message: .attributes.message
terraformVersion: .attributes."terraform-version"
appliedAt: .attributes."status-timestamps"."applied-at"
plannedAt: .attributes."status-timestamps"."planned-at"
source: .attributes.source
relations:
terraformCloudWorkspace: .relationships.workspace.data.id
State Version
State Version blueprint (click to expand)
{
"identifier": "terraformCloudStateVersion",
"description": "This blueprint represents a version of a Terraform state version",
"title": "Terraform Cloud State Versions",
"icon": "Terraform",
"schema": {
"properties": {
"createdAt": {
"type": "string",
"format": "date-time",
"title": "Creation Time",
"description": "Timestamp when the state version was created"
},
"serial": {
"type": "number",
"title": "Serial Number",
"description": "A unique identifier for this version within the workspace"
},
"status": {
"type": "string",
"title": "Status",
"description": "The current status of the state version (e.g., 'queued', 'finished')"
},
"size": {
"type": "number",
"title": "Size",
"description": "The size of the resources"
},
"isResourcesProcessed": {
"type": "boolean",
"title": "Is Resources Processed",
"description": "Whethere the resources has been processed"
},
"hostedStateDownloadUrl": {
"type": "string",
"title": "Download Url",
"format": "url",
"description": "Hosted state version download url "
},
"hostedJsonDownloadUrl": {
"type": "string",
"title": "Download Url",
"format": "url",
"description": "Url for downloading state version in json format"
},
"outputData": {
"type": "array",
"title": "Output",
"description": "output returned from state version"
},
"vcsCommitUrl": {
"type": "string",
"title": "VCS Commit URL",
"format": "url",
"description": "URL of the VCS commit that triggered this state version"
}
}
},
"relations": {},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {}
}
Integration configuration (click to expand)
- kind: state-version
selector:
query: "true"
port:
entity:
mappings:
identifier: .id
title: .id
blueprint: '"terraformCloudStateVersion"'
properties:
createdAt: .attributes."created-at"
serial: .attributes.serial
status: .attributes.status
size: .attributes.size
isResourcesProcessed: .attributes."resources-processed"
hostedStateDownloadUrl: .attributes."hosted-state-download-url"
hostedJsonDownloadUrl: .attributes."hosted-json-state-download-url"
vcsCommitUrl: .attributes."vcs-commit-url"
outputData: .__output
State file
State file blueprint (click to expand)
{
"identifier": "terraformCloudStateFile",
"description": "This blueprint represents a Terraform state file summary",
"title": "Terraform Cloud State File",
"icon": "Terraform",
"schema": {
"properties": {
"version": {
"type": "number",
"title": "State Version",
"description": "The version of the state file format"
},
"terraformVersion": {
"type": "string",
"title": "Terraform Version",
"description": "The version of Terraform used to create this state"
},
"serial": {
"type": "number",
"title": "Serial Number",
"description": "A unique serial number that increments with each state change"
},
"lineage": {
"type": "string",
"title": "Lineage UUID",
"description": "A unique identifier for the state lineage"
},
"resourceCount": {
"type": "number",
"title": "Total Resources",
"description": "The total number of resources in the state"
},
"resourceTypes": {
"type": "array",
"title": "Resource Types",
"description": "List of unique resource types in the state",
"items": {
"type": "string"
}
},
"providers": {
"type": "array",
"title": "Providers Used",
"description": "List of providers used in this state",
"items": {
"type": "string"
}
},
"outputKeys": {
"type": "array",
"title": "Output Keys",
"description": "List of output variable names defined in the state",
"items": {
"type": "string"
}
}
}
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {}
}
Integration configuration (click to expand)
- kind: state-file
selector:
query: "true"
port:
entity:
mappings:
identifier: .lineage + "-" + (.serial | tostring)
title: '"State v" + (.serial | tostring)'
blueprint: '"terraformCloudStateFile"'
properties:
version: .version
terraformVersion: .terraform_version
serial: .serial
lineage: .lineage
resourceCount: .resources | length
resourceTypes: .resources | map(.type) | unique | sort
providers: .resources | map(.provider) | unique | sort
outputKeys: .outputs | keys
Current only
You can use the currentOnly selector to control how state files are fetched.
By default, only the current state file is fetched per workspace, optimizing sync time and API usage.
- kind: state-file
selector:
query: "true"
currentOnly: false
Health assessment
Ingesting health assessment results
HCP Terraform requires organizations to be on a paid plan (Standard and Premium) to opt in for health assessments. For more information on assessment permissions and requirements, see the Terraform Cloud documentation.
Health assessment blueprint (click to expand)
{
"identifier": "terraformCloudHealthAssessment",
"description": "This blueprint represents a Terraform Cloud health assessment result",
"title": "Terraform Cloud Health Assessment",
"icon": "Terraform",
"schema": {
"properties": {
"createdAt": {
"type": "string",
"format": "date-time",
"title": "Created At",
"description": "Timestamp when the assessment result was created"
},
"drifted": {
"type": "boolean",
"title": "Drifted",
"description": "Whether drift was detected (actual infrastructure differs from desired state)"
},
"succeeded": {
"type": "boolean",
"title": "Succeeded",
"description": "Whether the overall health assessment completed successfully"
},
"allChecksSucceeded": {
"type": "boolean",
"title": "All Checks Succeeded",
"description": "Whether all continuous validation checks passed successfully"
},
"checksErrored": {
"type": "number",
"title": "Checks Errored",
"description": "Number of resources/data sources/outputs with condition errors"
},
"checksFailed": {
"type": "number",
"title": "Checks Failed",
"description": "Number of resources/data sources/outputs with one or more failing conditions"
},
"checksPassed": {
"type": "number",
"title": "Checks Passed",
"description": "Number of resources/data sources/outputs where all conditions passed"
},
"checksUnknown": {
"type": "number",
"title": "Checks Unknown",
"description": "Number of resources/data sources/outputs with unknown check status"
},
"resourcesDrifted": {
"type": "number",
"title": "Resources Drifted",
"description": "Number of resources that have drifted"
},
"resourcesUndrifted": {
"type": "number",
"title": "Resources Undrifted",
"description": "Number of resources that match the expected state (no drift)"
},
"errorMessage": {
"type": "string",
"title": "Error Message",
"description": "Error message if the assessment failed"
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {
"workspace": {
"title": "Terraform Cloud Workspace",
"description": "The Terraform Cloud workspace this assessment result belongs to",
"target": "terraformCloudWorkspace",
"required": true,
"many": false
}
}
}
Integration configuration (click to expand)
- kind: health-assessment
selector:
query: 'true'
port:
entity:
mappings:
identifier: .id
title: .type + "-" + .id
blueprint: '"terraformCloudHealthAssessment"'
properties:
createdAt: .attributes."created-at"
succeeded: .attributes.succeeded
allChecksSucceeded: .attributes."all-checks-succeeded"
drifted: .attributes.drifted
checksErrored: .attributes."checks-errored"
checksFailed: .attributes."checks-failed"
checksPassed: .attributes."checks-passed"
checksUnknown: .attributes."checks-unknown"
resourcesDrifted: .attributes."resources-drifted"
resourcesUndrifted: .attributes."resources-undrifted"
errorMessage: .attributes."error-message"
relations:
workspace: .relationships.workspace.data.id