Token导航 LogoToken导航TokenDH.com
开发external-serviceclawhub未标认证来源可访问clear审计通过

compound-eng-terraformcompound ENG Terraform ORM

Agent Skill

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

总安装

9,552

周安装

398

GitHub Stars

公开资料未说明

下载量

3,184
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:compound-eng-terraform(compound ENG Terraform ORM)
来源仓库:https://github.com/iliaal/compound-eng-terraform
安装命令:
openclaw skills install compound-eng-terraform
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install compound-eng-terraform

简介

compound-eng-terraform 提供 Terraform 与 OpenTofu 配置管理、模块设计与状态审查支持。

  • 适用于 OpenClaw 中使用 HCL、tfvars 或 tftest 进行基础设施即代码开发时使用。
  • 集成资源依赖分析与部署顺序建议,提升 IaC 可靠性。
  • 安装需确认云服务账号权限与区域设置,区分本地与生产环境操作。
  • 涉及删除资源或修改网络配置时应先评估影响范围,避免服务中断。

SKILL.md

name
ia-terraform
class
language
description
>-
paths
**/*.tf,**/*.tfvars

Terraform & OpenTofu

File Organization & Naming

FilePurpose
terraform.tfTerraform + provider version requirements
providers.tfProvider configurations
main.tfPrimary resources and data sources
variables.tfInput variables (alphabetical)
outputs.tfOutput values (alphabetical)
locals.tfLocal values
  • Lowercase with underscores: web_api, not webAPI or web-api
  • Descriptive nouns excluding resource type: aws_instance.web_api not aws_instance.web_api_instance
  • Singular, not plural
  • this for singleton resources (one of that type per module)
  • Contextual variable prefixes: vpc_cidr_block not cidr

Block Ordering

Resources: count/for_each (blank line after) → arguments → nested blocks → tagsdepends_onlifecycle (last)

Variables: descriptiontypedefaultvalidationnullable

Every variable needs type + description. Every output needs description. Mark secrets sensitive = true.

Module Structure

TypeScopeExample
Resource ModuleSingle logical groupVPC + subnets, SG + rules
Infrastructure ModuleCollection of resource modulesNetworking + compute for one region
CompositionComplete infrastructureSpans regions/accounts
module-name/
├── main.tf, variables.tf, outputs.tf, versions.tf
├── examples/
│   ├── minimal/
│   └── complete/
└── tests/
    └── defaults.tftest.hcl

Keep modules small (single responsibility). examples/ double as documentation and integration test fixtures. Semantic versioning for all published modules.

count vs for_each

ScenarioUse
Boolean toggle (create or skip)count = condition ? 1 : 0
Named/keyed items that may reorderfor_each = toset(list) or map
Fixed identical replicascount = N

Default to for_each -- removing a middle item from a count list recreates all subsequent resources. Use count only for boolean conditionals or truly identical replicas.

Testing

SituationApproach
Quick validationterraform fmt -check && terraform validate
Pre-commit+ tflint + trivy config . / checkov -d .
Logic validation (1.6+)Native terraform test with command = plan
Cost-free unit tests (1.7+)Native tests + mock_provider
Real infra validationNative tests with command = apply, or Terratest (Go)

Native test essentials (.tftest.hcl in tests/):

  • command = plan for fast unit tests; command = apply for integration (default)
  • assert { condition = expr; error_message = "..." } -- multiple per run block
  • expect_failures = [var.name] for negative testing (validate rejection of bad input)
  • mock_provider "aws" { mock_resource "..." { defaults = { ... } } } -- plan-mode only, no credentials, fast CI
  • variables {} at file level (all runs) or within a run block (override)
  • Reference prior run outputs: run.setup.vpc_id
  • parallel = true on independent runs with separate state -- creates sync point at next sequential run
  • state_key = "name" required for parallel = true runs with independent state
  • File naming: *_unit_test.tftest.hcl (plan mode) vs *_integration_test.tftest.hcl (apply mode)

Version Pinning

ComponentStrategyExample
TerraformPin minorrequired_version = "~> 1.9"
ProvidersPin majorversion = "~> 5.0"
Modules (prod)Pin exactversion = "5.1.2"
Modules (dev)Allow patchversion = "~> 5.1"

Key modern features: moved blocks (1.1+), optional() with defaults (1.3+), native testing (1.6+), mock providers (1.7+), cross-variable validation (1.9+), write-only arguments (1.11+). Stacks (HCP, preview): orchestrates multiple configs as a single deployment unit -- evaluate for multi-environment patterns.

State & Security

  • Remote backend with locking: S3+DynamoDB, Azure Blob, GCS, or Terraform Cloud. Never local state for shared infrastructure.
  • Encrypt state at rest. Never commit .tfstate, .terraform/, or *.tfplan. Always commit .terraform.lock.hcl.
  • default_tags on provider for consistent resource tagging.
  • Encryption at rest on all storage. Private networking by default -- public access is opt-in.
  • Least-privilege security groups. No 0.0.0.0/0 ingress without explicit justification.
  • Never hardcode credentials -- use assume_role, OIDC, or secrets managers.
  • Pre-commit: terraform fmt -recursive && terraform validate && trivy config .
  • moved { from = old; to = new } for refactoring resource names/modules without destroy-recreate. Remove block after apply.

Troubleshooting

  • State lock stuck: terraform force-unlock <ID> -- only after confirming no other operation running
  • Resource drift: terraform plan -refresh-only to detect, terraform apply -refresh-only to accept
  • Replace tainted: terraform apply -replace=ADDR (not deprecated terraform taint)
  • Import existing: import blocks (1.5+) for declarative import, or terraform import ADDR ID

Dependency Management

Use locals with try() to control deletion ordering without explicit depends_on:

locals {
  vpc_id = try(aws_vpc_ipv4_cidr_block_association.this[0].vpc_id, aws_vpc.this.id, "")
}

This forces Terraform to destroy subnets before CIDR associations -- prevents deletion errors.

  • cidrsubnet(var.vpc_cidr, 8, count.index) for calculated subnet CIDRs -- never hardcode subnets
  • Multi-region: provider "aws" { alias = "eu_west_1" } + providers = { aws = aws.eu_west_1 } in module blocks

Verify

Run before declaring done:

terraform fmt -check && terraform validate && tflint && trivy config .

All commands must pass with zero errors.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

84.69%
按下载量换算2,697

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills