terraform-workflow — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited terraform-workflow (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Infrastructure as Code practices with Terraform.
Use this skill when:
# Initialize working directory
terraform init
# Upgrade providers
terraform init -upgrade
# Reconfigure backend
terraform init -reconfigure# Preview changes
terraform plan
# Save plan to file
terraform plan -out=tfplan
# Plan for specific target
terraform plan -target=aws_instance.example
# Plan destroy
terraform plan -destroy# Apply changes (with approval)
terraform apply
# Apply saved plan (no approval needed)
terraform apply tfplan
# Auto-approve (use with caution!)
terraform apply -auto-approve
# Apply specific target
terraform apply -target=aws_instance.example# Plan destruction first
terraform plan -destroy
# Destroy with approval
terraform destroy
# Destroy specific resource
terraform destroy -target=aws_instance.example# List resources in state
terraform state list
# Show specific resource
terraform state show aws_instance.example
# Full state (sensitive!)
terraform show# Move resource (rename)
terraform state mv aws_instance.old aws_instance.new
# Remove from state (resource still exists)
terraform state rm aws_instance.example
# Import existing resource
terraform import aws_instance.example i-1234567890abcdef0
# Pull remote state locally
terraform state pull > terraform.tfstate.backup# Force unlock (use carefully!)
terraform force-unlock LOCK_ID# List workspaces
terraform workspace list
# Create workspace
terraform workspace new staging
# Switch workspace
terraform workspace select production
# Current workspace
terraform workspace show# Validate configuration
terraform validate
# Format code
terraform fmt
# Format check (CI/CD)
terraform fmt -check
# Recursive format
terraform fmt -recursive# All outputs
terraform output
# Specific output
terraform output instance_ip
# JSON format
terraform output -json# Use var file
terraform plan -var-file=production.tfvars
# Override variable
terraform plan -var="instance_type=t3.large"# Enable debug logging
export TF_LOG=DEBUG
terraform plan
# Log to file
export TF_LOG_PATH=terraform.log
terraform plan
# Disable logging
unset TF_LOG TF_LOG_PATH| Issue | Cause | Fix |
|---|---|---|
| State lock | Concurrent access | terraform force-unlock |
| Provider error | Version mismatch | terraform init -upgrade |
| Resource drift | Manual changes | terraform refresh then plan |
| Cycle error | Circular dependency | Break dependency with depends_on |
# Update state with real infrastructure
terraform refresh
# Or use plan with refresh
terraform plan -refresh-only# forces replacement# 1. Always plan first
terraform plan -out=tfplan
# 2. Review plan carefully
terraform show tfplan
# 3. Apply saved plan
terraform apply tfplan
# 4. Verify changes
terraform show# In your terraform config
resource "aws_instance" "critical" {
# ...
lifecycle {
prevent_destroy = true
}
}# Get modules
terraform get
# Update modules
terraform get -update
# Show module tree
terraform providers- name: Terraform Plan
run: |
terraform init
terraform plan -out=tfplan -no-color
- name: Terraform Apply
if: github.ref == 'refs/heads/main'
run: terraform apply -auto-approve tfplan# Generate plan for PR comment
terraform plan -no-color > plan.txt 2>&1# With Infracost
infracost breakdown --path .
# Cost diff
infracost diff --path .# With tfsec
tfsec .
# With checkov
checkov -d .
# With trivy
trivy config .# Full workflow
terraform init && terraform plan -out=tfplan && terraform apply tfplan
# Check what would be destroyed
terraform plan -destroy | grep "will be destroyed"
# List all resources
terraform state list
# Import resource
terraform import aws_instance.name i-1234567890
# Taint for recreation
terraform taint aws_instance.example
terraform untaint aws_instance.example~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.