/vibe:ghcopilot-instr-terraform-azurefrom vibe
Guides Azure Terraform best practices including CALMS framework, behavioral hierarchy, and planning file awareness for infrastructure-as-code workflows.
Ships in vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This instruction set extends the universal DevOps Core Principles and Taming Copilot directives for Azure/Terraform scenarios. It assumes those foundational rules are loaded but includes summaries here for self-containment. If the general rules are not present, these summaries serve as defaults to maintain behavioral consistency.
These summaries ensure the mode functions independently while aligning with the broader chat mode context. For full details, reference the original DevOps Core Principles and Taming Copilot instructions.
When operating in chat mode with these instructions loaded:
.terraform-planning-files/ folder (if present). Read and incorporate relevant details from these files into responses, especially for migration or implementation plans. If speckit or similar planning files exist in user-specified folders, prompt the user to confirm inclusion or read them explicitly.These instructions provide Azure-specific guidance for solutions created Terraform, including how to incorporate and use Azure Verified Modules.
For general Terraform conventions, see terraform.instructions.md.
For development of modules, especially Azure Verified Modules, see azure-verified-modules-terraform.instructions.md.
Configuration:
terraform import as a regular workflow patternlocal-exec provisioners unless absolutely necessarySecurity:
Operational:
**/*.tfstate) for read only operations, all changes must be made via Terraform CLI or HCL.**/.terraform/** (fetched modules and providers) for read only operations.These build on the incorporated Taming Copilot directives for secure, operational practices.
Structure Terraform configurations with logical file separation:
main.tf for resourcesvariables.tf for inputsoutputs.tf for outputsterraform.tf for provider configurationslocals.tf to abstract complex expressions and for better readabilityterraform fmt)main.networking.tf, main.storage.tf - move equivalent variables to variables.networking.tf, etc.)Use snake_casing for variables and module names.
Any significant resource should use an AVM if available. AVMs are designed to be aligned to the Well Architected Framework, are supported and maintained by Microsoft helping reduce the amount of code to be maintained. Information about how to discover these is available in Azure Verified Modules for Terraform.
If an Azure Verified Module is not available for the resource, suggest creating one "in the style of" AVM in order to align to existing work and provide an opportunity to contribute upstream to the community.
An exception to this instruction is if the user has been directed to use an internal private registry, or explicitly states they do not wish to use Azure Verified Modules.
This aligns with the incorporated DevOps Automation principle by leveraging pre-validated, community-maintained modules.
Follow AVM-aligned coding standards in solution code to maintain consistency:
sensitive = false explicitly (per TFNFR22). Handle sensitive default values correctly (per TFNFR23).coalesce or try functions for default values (per TFNFR13).locals.tf specifically for local values (per TFNFR31) and ensure precise typing for locals (per TFNFR33).The best secret is one that does not need to be stored. e.g. use Managed Identities rather than passwords or keys.
Use ephemeral secrets with write-only parameters when supported (Terraform v1.11+) to avoid storing secrets in state files. Consult module documentation for availability.
Where secrets are required, store in Key Vault unless directed to use a different service.
Never write secrets to local filesystems or commit to git.
Mark sensitive values appropriately, isolate them from other attributes, and avoid outputting sensitive data unless absolutely necessary. Follow TFNFR19, TFNFR22, and TFNFR23.
sensitive = true for outputs containing secretsoutput "resource_group_name" {
description = "Name of the created resource group"
value = azurerm_resource_group.example.name
}
output "virtual_network_id" {
description = "ID of the virtual network"
value = azurerm_virtual_network.example.id
}
locals {
common_tags = {
Environment = var.environment
Project = var.project_name
Owner = var.owner
CreatedBy = "terraform"
}
resource_name_prefix = "${var.project_name}-${var.environment}"
location_short = substr(var.location, 0, 3)
}
Redundant depends_on Detection: Search and remove depends_on where the dependent resource is already referenced implicitly in the same resource block. Retain depends_on only where it is explicitly required. Never depend on module outputs.
Iteration: Use count for 0-1 resources, for_each for multiple resources. Prefer maps for stable resource addresses. Align with TFNFR7.
Data sources: Acceptable in root modules but avoid in reusable modules. Prefer explicit module parameters over data source lookups.
Parameterization: Use strongly typed variables with explicit type declarations (TFNFR18), comprehensive descriptions (TFNFR17), and non-nullable defaults (TFNFR20). Leverage AVM-exposed variables.
Versioning: Target latest stable Terraform and Azure provider versions. Specify versions in code and keep updated (TFFR3).
Use a consistent folder structure for Terraform configurations.
Use tfvars to modify environmental differences. In general, aim to keep environments similar whilst cost optimising for non-production environments.
Antipattern - branch per environment, repository per environment, folder per environment - or similar layouts that make it hard to test the root folder logic between environments.
Be aware of tools such as Terragrunt which may influence this design.
A suggested structure is:
my-azure-app/
├── infra/ # Terraform root module (AZD compatible)
│ ├── main.tf # Core resources
│ ├── variables.tf # Input variables
│ ├── outputs.tf # Outputs
│ ├── terraform.tf # Provider configuration
│ ├── locals.tf # Local values
│ └── environments/ # Environment-specific configurations
│ ├── dev.tfvars # Development environment
│ ├── test.tfvars # Test environment
│ └── prod.tfvars # Production environment
├── .github/workflows/ # CI/CD pipelines (if using github)
├── .azdo/ # CI/CD pipelines (suggested if using Azure DevOps)
└── README.md # Documentation
Never change the folder structure without direct agreement with the user.
Follow AVM specifications TFNFR1, TFNFR2, TFNFR3, and TFNFR4 for consistent file naming and structure.
terraform validate to check syntaxterraform plan. Terraform plan will require a subscription ID, this should be sourced from the ARM_SUBSCRIPTION_ID environment variable, NOT coded in the provider block.If general rules are not loaded, default to: minimalist code generation, explicit consent for any terraform commands beyond validate, and adherence to CALMS principles in all suggestions.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
terraform, azure, infrastructure-as-code, copilot-instructions
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job