dsh-terraform

by WODE25500

开发与运行时github收录于 08-21

基础设施即代码:plan/apply 门控、state/output 检查与配置校验。

Infrastructure as code: gated plan/apply, state and output inspection, and configuration validation via the terraform CLI.

安装

dsh plugin --profile web add github:WODE25500/dsh-terraform

GitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试

安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗

安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。

README

目录

dsh-terraform

HashiCorp Terraform 的 DeepSeek Harness 插件 —— 让 dsh 智能体管理基础设施即代码(IaC): plan/apply 门控、state 检查、output 查询、资源校验。

独立社区项目,非官方。基于 hashicorp/terraform(BSL-1.1/MPL-2.0)。

特性

  • 8 个原生工具:tf_init / tf_plan / tf_apply / tf_destroy / tf_state / tf_output / tf_show / tf_validate
  • 只读操作为主(plan/state/output/show/validate),安全边界清晰
  • plan 的 -detailed-exitcode 语义(exit 2 = 有变更)在输出中标注
  • 支持 plan 文件模式(plan -out → apply tfplan)——可复现、可审阅
  • Schemastery 配置 + bundle patch 层

安装

- insert:
    - id: terraform
      name: './src/index.js'
      config:
        terraformPath: terraform
        workdir: ./infra
pnpm dsh web --patch ./dsh-terraform/cordis.patch.yml

配置项

键 默认 说明
terraformPath terraform terraform 路径
workdir — 默认配置目录
timeoutMs 120000 单次超时

许可

MIT。

原始 README: https://github.com/WODE25500/dsh-terraform/blob/main/README.md ↗