Azure Terraform CLI
SkillFiles & storageTerraform CLI operations manage Azure infrastructure as code through Terraform formatting, validation, initialization, planning, apply workflows, destroy workflows, state inspection, import workflows, module development, provider lock files, tfvars, and security scanning. Use this skill when working with terraform init, plan, apply, destroy, validate, fmt, state, import, or tfsec workflows.
Use Azure Terraform CLI in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Azure Terraform CLI and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Azure Terraform CLI skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; Ahel provides instructions and does not run this skill.
No other account needed.
Add Ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
What this skill tells your AI
The instructions your AI receives, as published by gbb-acelerators/awesome-harness-primitives in harness/claude-code/skills/azure-terraform-cli/SKILL.md and read by Ahel’s review.
Use this skill to turn Terraform infrastructure requests into ordered CLI workflows, preserve plan and state safety, and return formatting, validation, plan, scan, or read-only state evidence with exit codes and next-step recommendations.
When to invoke
- "Validate or format Terraform configurations."
- "Run terraform init or create a Terraform plan."
- "Summarize resources to add, change, or destroy from a Terraform plan."
- "Inspect Terraform state without changing resources."
- "Run tfsec or Checkov against infrastructure code."
Prerequisites and context
- Terraform >= 1.5.0 installed.
- Azure CLI authenticated.
- Backend storage account accessible.
- Environment variables: ARM_SUBSCRIPTION_ID, ARM_TENANT_ID.
Procedure
- Confirm the working directory, backend mode, environment, and tfvars file before running Terraform commands.
- Run formatting and validation before planning when configuration changes are in scope.
- Initialize with the appropriate backend mode for the requested workflow.
- Create and inspect plans with saved plan files when planning changes.
- Keep state operations read-only unless a separate approved workflow explicitly requires mutation.
- Return the result using the output template.
Format and validate
# Check formatting
terraform fmt -check -recursive -diff
# Apply formatting
terraform fmt -recursive
# Validate configuration
terraform init -backend=false
terraform validate
Planning
# Initialize with backend
terraform init -reconfigure
# Create plan
terraform plan -var-file=environments/${ENVIRONMENT}.tfvars -out=tfplan -detailed-exitcode
# Show plan in JSON
terraform show -json tfplan | jq '.resource_changes'
Security scanning
# TFSec scan
tfsec . --format=json --out=tfsec-results.json
# Checkov scan
checkov -d . --output-file=checkov-results.json --output=json
State operations (read-only)
# List resources
terraform state list
# Show resource details
terraform state show 'azurerm_kubernetes_cluster.main'
Best practices
- ALWAYS run
terraform fmtbefore committing. - ALWAYS run
terraform validatebefore planning. - NEVER commit .tfstate files.
- ALWAYS use -out flag for plans to review.
- Use workspaces for environment separation.
- Enable state locking with Azure blob lease.
Output template
Return exactly this structure:
**Status:** PASS | FAIL | BLOCKED
**Summary:** One sentence describing the formatting, validation, plan, scan, state, or infrastructure outcome.
### Details
1. Command executed: `<terraform, tfsec, or checkov command with full parameters>`
2. Exit code: `<0 success, 1 error, 2 changes pending, or tool-specific code>`
3. Workspace or environment: `<workspace, ENVIRONMENT, or tfvars file>`
4. Plan summary: `<resources to add/change/destroy or not applicable>`
5. Warnings or errors: `<line references, scan findings, backend issues, or none>`
6. Recommendations: `<next Terraform action or none>`
### Validation
- Formatting and validation: `<terraform fmt or validate evidence or reason not checked>`
- Plan or state evidence: `<terraform plan, show, state list, state show, scan output, or reason not checked>`
Limits
- Do not use this skill for Azure CLI day-2 commands.
- Use
azure-cli(skill) instead when the task is direct Azure resource queries, AKS credentials, ACR, Key Vault, account context, RBAC checks, or managed identity operations. - Do not use this skill for Azure architecture design.
- Use
azure-infrastructure(skill) instead when the task is architecture patterns, hub-spoke networking, private endpoints, naming, tagging, or Workload Identity design. - Do not use this skill for Kubernetes operations.
- Use
azure-kubectl-cli(skill) instead when the task is Kubernetes resource inspection, logs, events, manifests, rollout, or troubleshooting. - Do not use this skill for Helm charts.
- Use
azure-helm-cli(skill) instead when the task is chart values, repositories, templates, releases, upgrades, or rollbacks. - Do not use this skill for full deployment orchestration.
- Use
open-horizons-deploy-orchestration(skill) instead when the task spans prerequisites, Terraform apply sequencing, Kubernetes verification, and platform validation.
Related primitives
| Name | Type | Use it when |
|---|---|---|
open-horizons-terraform | agent | Designing or implementing Terraform modules and infrastructure changes. |
open-horizons-security-reviewer | agent | Reviewing Terraform security, compliance, or policy findings. |
open-horizons-deployment-operator | agent | Coordinating approved Terraform execution as part of platform deployment. |
azure-cli | skill | Verifying Azure account, resource, AKS, ACR, or Key Vault state outside Terraform. |
azure-infrastructure | skill | Choosing Azure architecture patterns before encoding infrastructure. |
open-horizons-terraform-change | skill | Repository-specific validation is required after Terraform changes. |
Quality gate
-
nameisazure-terraform-cliand matches the parent directory. -
terraform fmtandterraform validateare run or explicitly marked not applicable before planning. - Plans use
-out=tfplanand report exit code semantics when a plan is created. - State operations are read-only unless a separately approved mutating workflow is in scope.
- Security scan outputs preserve
tfsec-results.jsonorcheckov-results.jsonpaths when scans run. -
.tfstatefiles are not committed or exposed in the response.
Signals
- GitHub stars
- 20
- Last commit
- Sep 2026
Ahel review
S4info
community integration, published by gbb-acelerators, not azure
Automated review, not a security audit. Ruleset v1+k2.
Advanced
- Item type
- skill
- Key
azure-terraform-cli- Source
- github.com/gbb-acelerators/awesome-harness-primitives
github.com/gbb-acelerators/awesome-harness-primitives
Related picks
Skill · larksuite
The pick for Markdownmarkdown-formatter
Skill · nvidia
The pick for Markdownazure-kubernetes
Skill · microsoft
The pick for Kubernetesdt-obs-kubernetes
Skill · dynatrace
The pick for Kubernetesazure-quotas
Skill · microsoft
The pick for Azureazure-cosmos-db
Skill · microsoftdocs
The pick for Azure