@globallogicuki/backstage-plugin-terraform

中文文档
0.12.0发布于 2026/08/25Apache-2.0TypeScriptCommonJS近 30 天下载 5019

Backstage frontend plugin showing Terraform runs, health assessments, and validation checks for catalog entities

原始使用文档
文档目录7 节
  1. Install
  2. Setup
  3. Configuration
  4. Terraform Latest Run card
  5. Terraform Workspace Health card
  6. Terraform Drift Metrics
  7. Terraform Validation Checks

Terraform Frontend Plugin for Backstage

You can use this plugin to display a list of terraform runs for one or more workspaces.

Terraform Runs - Single Workspace

Terraform Runs - Multiple Workspaces

Install

yarn add @globallogicuki/backstage-plugin-terraform

Setup

This plugin is designed to work in its own tab within an entity. You will need to add the <EntityTerraformContent /> component to the entity page in the frontend app.

There is a isTerraformAvailable helper function and a <EntityTerraformCard /> component available should you wish to use this within an existing tab.

Edit the packages/app/src/components/catalog/EntityPage.tsx and add the imports:

import { EntityTerraformContent } from '@globallogicuki/backstage-plugin-terraform';

Then add the following route and component to the desired entity page:

<EntityLayout.Route path="/terraform" title="Terraform">
  <EntityTerraformContent />
</EntityLayout.Route>

There are two annotations that you should add to your catalog-info.yaml file:

annotations:
  terraform/organization: orgName
  terraform/workspaces: workspaceName1,workspaceName2,workspaceName3

You will also need to have the terraform backend plugin installed and running.

Configuration

The plugin reads the optional integrations.terraform.baseUrl value from your app-config.yaml to build links to the Terraform web UI:

integrations:
  terraform:
    baseUrl: https://tfe.enterprise.com # Optional, the web origin of your Terraform instance. Defaults to https://app.terraform.io

This is the same value used by the backend plugin, which derives the Terraform API root from it by appending /api/v2.

Terraform Latest Run card

Latest Run card - Single Workspace

Latest Run card - Multiple Workspaces

This is an additional component that can be referenced with <EntityTerraformLatestRunCard> and imported and added to the EntityPage.tsx file for routing.

Terraform Workspace Health card

Workspace Health card - Light mode

This is an additional component that can be referenced with <EntityTerraformWorkspaceHealthAssessmentsCard> and imported and added to the EntityPage.tsx file for routing from the plugin root.

Alternatively it can be referenced from within another component, using the <TerraformWorkspaceHealthAssessments> tag.

It will render a Health Card for each workspace defined in your catalog-info.yaml file, with each Health Card containing child cards for Drift Metrics and Validation Checks for a particular workspace.

Terraform Drift Metrics

Workspace Health card - Drift Only

The Drift card is visible within the Workspace Health component by default, but can be optionally hidden using the showDrift property on the <TerraformWorkspaceHealthAssessments> tag, eg:

<TerraformWorkspaceHealthAssessments showDrift={false}>

The Drift card further incorporates a navigational element, providing a direct link to the dedicated Drift view for the Workspace within your Terraform deployment if a more granular breakdown is required.

Terraform Validation Checks

Workspace Health card - Validation Checks Only

The Validation Checks card is also visible within the Workspace Health component by default, but can be optionally hidden using the showValidationChecks property on the <TerraformWorkspaceHealthAssessments> tag, eg:

<TerraformWorkspaceHealthAssessments showValidationChecks={false}>

The Validation Checks card also incorporates a direct link to the Continuous Validation view for the Workspace within your Terraform deployment if a more detailed breakdown is needed.

版本与发布记录

@globallogicuki/backstage-plugin-terraform 共发布 25 个版本,首次发布于 2024/02/16;过去 12 个月发布了 5 个版本。

版本发布日期距今
0.12.0latest2026/08/252 个月前
0.11.72026/08/252 个月前
0.11.62026/06/234 个月前
0.11.52025/12/0511 个月前
0.11.42025/12/0311 个月前
0.11.32025/09/021.2 年前

关于 @globallogicuki/backstage-plugin-terraform 的常见问题

@globallogicuki/backstage-plugin-terraform 是什么?

Backstage frontend plugin showing Terraform runs, health assessments, and validation checks for catalog entities

如何安装 @globallogicuki/backstage-plugin-terraform?

在项目目录运行 npm install @globallogicuki/backstage-plugin-terraform,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^16.13.1 || ^17.0.0 || ^18.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@globallogicuki/backstage-plugin-terraform 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@globallogicuki/backstage-plugin-terraform 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@globallogicuki/backstage-plugin-terraform 可以商用吗?

@globallogicuki/backstage-plugin-terraform 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@globallogicuki/backstage-plugin-terraform 的下载量有多少?

根据 npm 官方下载统计,@globallogicuki/backstage-plugin-terraform 在 2026/10/17 – 2026/11/15 这 30 天内被下载 5,019 次,日均约 167 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@globallogicuki/backstage-plugin-terraform 还在维护吗?

最新版本 0.12.0 发布于 2026/08/25(2 个月前);至今共发布 25 个版本,其中过去 12 个月发布了 5 个;首次发布于 2024/02/16。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。