terraform-helper
Terraform and OpenTofu infrastructure as code - HCL, providers, modules, state management, and CLI operations When user works with .tf files, mentions Terraform, OpenTofu, tofu, HCL, infrastructure as code, or tf commands
What this skill does
# Terraform & OpenTofu Helper Agent
## What's New
### Terraform 1.11 (Latest Stable)
- **Write-Only Arguments**: Extend ephemeral values to managed resources; write-only arguments accept ephemeral values and are never persisted in plan or state files (e.g., `password_wo` on `aws_db_instance`)
- **Write-Only Versioning**: Use `_wo_version` attributes to control when write-only values are re-sent to providers
### Terraform 1.10
- **Ephemeral Values**: Ephemeral input/output variables, ephemeral resources, and `ephemeralasnull` function; secrets never stored in state or plan files
- **Ephemeral Resources**: Available in AWS, Azure, Kubernetes, and random providers for temporary credentials, tokens, and tunnels
- **`terraform.applying` Function**: Distinguish between plan and apply phases in expressions
- **Performance**: Refactored plan changes and reduced repeated state decoding
- **Testing**: Backend blocks in run blocks, `skip_cleanup` attribute for test files
### Terraform 1.9
- **Enhanced Variable Validation**: Validation conditions can reference other variables, data sources, and locals
- **`templatestring` Function**: Render templates from dynamic sources without saving to disk
- **Moved Block Improvements**: Refactor `null_resource` to `terraform_data` via moved blocks
- **Provisioner in `removed` Blocks**: Execute destroy-time provisioners when removing resource declarations
### Terraform 1.8
- **Provider-Defined Functions**: Call custom provider functions with `provider::name::function()` syntax
- **Cross-Type Refactoring**: Move resources between different types using moved blocks (provider support required)
- **Provider Functions for AWS/GCP/K8s**: ARN parsing, resource ID parsing, manifest encoding/decoding
### OpenTofu 1.9
- **`for_each` on Providers**: Aliased provider configurations support `for_each` for dynamic multi-instance providers
- **`-exclude` Flag**: Exclude specific resources from plan/apply operations
- **Early Evaluation Prompts**: Interactive variable prompting during early evaluation phase
- **`encrypted_metadata_alias`**: Explicit ID control for encrypted state data
### OpenTofu 1.8
- **`.tofu` File Extension**: OpenTofu-specific files that override identically named `.tf` files for dual compatibility
- **Early Evaluation**: Use variables and locals in backend config, module sources, and encryption config
- **Provider Mocking**: Mock providers in test files for isolated unit testing
- **State Encryption**: End-to-end client-side encryption with AES-GCM, PBKDF2, AWS KMS, GCP KMS key providers
## Overview
Terraform and OpenTofu are infrastructure as code (IaC) tools that use HashiCorp Configuration Language (HCL) to define and provision cloud infrastructure declaratively. OpenTofu is an open-source fork (MPL 2.0) of Terraform (BSL licensed), maintaining HCL compatibility while adding features like state encryption and provider `for_each`.
## CLI Commands
### Auto-Approved Commands (Safe / Read-Only)
The following commands are safe to run without user confirmation:
- `terraform plan` / `tofu plan` - Preview changes without applying
- `terraform validate` / `tofu validate` - Check configuration syntax and consistency
- `terraform fmt` / `tofu fmt` - Format HCL files to canonical style
- `terraform fmt -check` - Check formatting without modifying files
- `terraform show` / `tofu show` - Display state or plan file contents
- `terraform state list` / `tofu state list` - List resources in state
- `terraform state show <addr>` - Show attributes of a single resource
- `terraform output` / `tofu output` - Display output values
- `terraform providers` / `tofu providers` - Show required providers
- `terraform version` / `tofu version` - Show version information
- `terraform graph` / `tofu graph` - Generate dependency graph (DOT format)
- `terraform workspace list` - List workspaces
- `terraform console` - Interactive expression evaluation
### Commands Requiring Confirmation
These commands modify infrastructure or state and need user approval:
- `terraform apply` / `tofu apply` - Create or update infrastructure
- `terraform destroy` / `tofu destroy` - Destroy managed infrastructure
- `terraform import` / `tofu import` - Import existing resources into state
- `terraform state mv` - Move resources within state
- `terraform state rm` - Remove resources from state (does not destroy)
- `terraform state push` - Overwrite remote state
- `terraform taint` / `terraform untaint` - Mark/unmark resource for recreation
- `terraform force-unlock` - Manually release a state lock
- `terraform workspace new/delete` - Create or delete workspaces
### Common Workflows
```bash
# Initialize working directory (downloads providers, modules)
terraform init
# Format all .tf files recursively
terraform fmt -recursive
# Validate configuration
terraform validate
# Preview changes
terraform plan
# Preview changes and save plan
terraform plan -out=tfplan
# Apply saved plan (no confirmation prompt)
terraform apply tfplan
# Apply with auto-approve (use cautiously)
terraform apply -auto-approve
# Apply targeting specific resources
terraform plan -target=aws_instance.web
terraform apply -target=aws_instance.web
# Destroy specific resource
terraform destroy -target=aws_instance.web
# Generate plan for destroy
terraform plan -destroy
# Refresh state without apply
terraform apply -refresh-only
# Show outputs in JSON
terraform output -json
```
### Initialization
```bash
# Standard init
terraform init
# Upgrade providers and modules
terraform init -upgrade
# Reconfigure backend (e.g., migrating state)
terraform init -reconfigure
# Migrate state to new backend
terraform init -migrate-state
# Init with backend config from file
terraform init -backend-config=backend.hcl
# Init with backend config as key-value
terraform init -backend-config="bucket=my-state-bucket"
```
### State Inspection
```bash
# List all resources in state
terraform state list
# Show specific resource details
terraform state show aws_instance.web
# Show full state as JSON
terraform show -json
# Pull remote state locally
terraform state pull > state.json
# Show specific output
terraform output db_endpoint
```
## HCL Basics
### File Structure
```
project/
main.tf # Core resource definitions
variables.tf # Input variable declarations
outputs.tf # Output value definitions
versions.tf # Terraform and provider version constraints
terraform.tfvars # Variable values (do not commit secrets)
locals.tf # Local value definitions (optional)
data.tf # Data source definitions (optional)
backend.tf # Backend configuration (optional)
```
### Resource and Data Source Syntax
```hcl
# Resource block
resource "aws_instance" "web" {
ami = "ami-0c55b159cbfafe1f0"
instance_type = var.instance_type
tags = {
Name = "web-server"
}
}
# Data source (read-only query)
data "aws_ami" "ubuntu" {
most_recent = true
owners = ["099720109477"]
filter {
name = "name"
values = ["ubuntu/images/hvm-ssd/ubuntu-*-amd64-server-*"]
}
}
# Reference data source
resource "aws_instance" "web" {
ami = data.aws_ami.ubuntu.id
}
```
### Variables, Outputs, and Locals
```hcl
# Variable with validation
variable "instance_type" {
type = string
default = "t3.micro"
description = "EC2 instance type"
validation {
condition = contains(["t3.micro", "t3.small", "t3.medium"], var.instance_type)
error_message = "Instance type must be t3.micro, t3.small, or t3.medium."
}
}
# Output
output "instance_ip" {
value = aws_instance.web.public_ip
description = "Public IP of the web instance"
sensitive = false
}
# Locals
locals {
common_tags = {
Environment = var.environment
Project = var.project_name
ManagedBy = "terraform"
}
}
```
### Provider Configuration
```hcl
terraform {
required_version = ">= 1.8"
required_providers {
aws =Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.