azure-infra-preflight

Validate Azure CLI authentication, SSH keys, and Terraform versions before plan execution.

1|Updated Jun 11, 2026
One-click install
npx skills add https://github.com/sergeyitaly/claude-skill-deployer --skill azure-infra-preflight
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-infra-preflight
Source: https://github.com/sergeyitaly/claude-skill-deployer/tree/main/skills_library/azure-infra-preflight
Command: npx skills add https://github.com/sergeyitaly/claude-skill-deployer --skill azure-infra-preflight

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

First-time Azure Terraform deployments frequently fail due to unverified prerequisites like unauthenticated Azure CLI, incompatible SSH keys, existing resources not imported into Terraform state, or outdated Terraform versions, leading to hours of avoidable debugging and failed apply runs.

Core Features & Use Cases

  • Prerequisite Validation: Confirms Azure CLI and Terraform (>=1.6) are installed and accessible, stopping immediately if either is missing.
  • Authentication & Context Setup: Verifies active Azure login, saves subscription context to avoid repeated logins in future sessions.
  • SSH Key Compliance: Checks for RSA SSH keys (required by Azure, which rejects ed25519 for Linux VMs) and generates compliant keys if none exist.
  • Existing Resource Handling: Detects if target resource groups already exist, lists all existing resources, and auto-generates Terraform import blocks to avoid destructive resource recreation.
  • Audit Logging: Records all preflight check results for traceability and troubleshooting. Use Case: A DevOps engineer setting up a new Azure Terraform project can run this preflight check before their first terraform plan to eliminate the most common first-run errors that would otherwise block deployment.

Quick Start

Run the azure-infra-preflight skill before executing your first terraform plan on a new or existing Azure environment to validate all prerequisites and avoid common deployment errors.

Frequently Asked Questions about azure-infra-preflight

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my Azure Terraform first-run deployment fail during plan or apply?

Terraform import blocks are a native feature for state reconciliation. The preflight process detects existing Azure resources and auto-generates Terraform import blocks to avoid destructive resource recreation during deployment.

How do I validate Azure CLI authentication before running Terraform?

To validate Azure CLI authentication, run a preflight check that verifies active Azure login and saves subscription context. This prevents repeated logins and ensures Terraform can access Azure resources without authentication errors.

Does Azure Terraform support ed25519 SSH keys for Linux virtual machines?

Terraform import blocks are a native feature for state reconciliation. The preflight process detects existing Azure resources and auto-generates Terraform import blocks to avoid destructive resource recreation during deployment.

What Terraform version is required for Azure infrastructure deployment with import blocks?

Terraform import blocks are a native feature for state reconciliation. The preflight process detects existing Azure resources and auto-generates Terraform import blocks to avoid destructive resource recreation during deployment.

How to import existing Azure resource groups into Terraform state?

Terraform import blocks are a native feature for state reconciliation. The preflight process detects existing Azure resources and auto-generates Terraform import blocks to avoid destructive resource recreation during deployment.

What are common limitations when setting up Azure Infrastructure as Code from scratch?

Terraform import blocks are a native feature for state reconciliation. The preflight process detects existing Azure resources and auto-generates Terraform import blocks to avoid destructive resource recreation during deployment.