AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Azure Infra Preflight

skill-sergeyitaly-claude-skill-deployer-azure-infra-preflight · by sergeyitaly

Pre-flight checklist before any Azure Terraform deploy — verify az login, detect SSH key type (Azure only accepts RSA), check whether the target resource group already exists and list resources to generate import blocks, validate Terraform version, and write subscription context. Use before terraform plan/apply on a new or potentially pre-existing Azure environment, or when setting up Azure IaC f…

No reviews yet
0 installs
37 views
0.0% view→install

Install

$ agentstack add skill-sergeyitaly-claude-skill-deployer-azure-infra-preflight

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-sergeyitaly-claude-skill-deployer-azure-infra-preflight)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Azure Infra Preflight? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Azure Infra Preflight

A pre-deploy checklist that prevents the most common first-run failures in Azure Terraform workflows. Run this before writing a terraform plan.

1. Verify toolchain

mcp__claude-skills-cli__list_available_clis

Confirm az and terraform are both available. If either is missing, stop and tell the user which tool to install.

Check Terraform version:

mcp__claude-skills-cli__run_command { cli: "terraform", args: ["version"] }

Gate on >= 1.6 (required for import {} block syntax support).

2. Azure login + record subscription

mcp__claude-skills-cli__run_command { cli: "az", args: ["account", "show", "--output", "json"] }

If exitCode ≠ 0: stop. Tell the user to run az login manually (the MCP server cannot open a browser).

If exitCode = 0: write the JSON to /.claude//subscription.json via mcp__filesystem__write_file so subsequent sessions skip this step.

3. SSH key type check (Azure rejects ed25519)

Before writing terraform.tfvars with an SSH public key:

  1. Check ~/.ssh/id_rsa.pub first (preferred for Azure).
  2. If only ~/.ssh/id_ed25519.pub exists, do not use it — Azure

azurerm_linux_virtual_machine rejects ed25519 at terraform plan time with a hard error, even though init succeeds.

  1. If no RSA key exists, generate one:

`` mcp__claude-skills-cli__run_command { cli: "ssh-keygen", // only if on allow-list, otherwise use Bash args: ["-t", "rsa", "-b", "4096", "-f", "/.claude//deploy-key", "-N", ""] } ` On Windows, use Git Bash via Bash tool if ssh-keygen is not on the CLI allow-list: `bash ssh-keygen -t rsa -b 4096 -f "/deploy-key" -N "" && cat "/deploy-key.pub" ``

4. Check whether resources already exist (import-before-apply)

mcp__claude-skills-cli__run_command {
  cli: "az",
  args: ["group", "exists", "--name", ""]
}
  • stdout = false: resources are new — proceed with terraform plan normally.
  • stdout = true: resources already exist. List them:

`` mcp__claude-skills-cli__run_command { cli: "az", args: ["resource", "list", "--resource-group", "", "--output", "json"] } ` For each resource, generate a native import {} block (TF >= 1.7): `hcl import { to = azurerm_. id = "/subscriptions/.../resourceGroups//providers//" } ` Write these to imports.tf in the Terraform root. Running terraform plan with import blocks present will reconcile state without destroying resources. Remove import blocks once terraform apply` completes.

Why: skipping this step causes terraform apply to attempt creating resources that already exist, producing ResourceAlreadyExists errors and requiring manual terraform import calls for each resource.

Windows / Git Bash path mangling — if using the legacy terraform import CLI (not import {} blocks), Git Bash converts /subscriptions/... to C:/Program Files/Git/subscriptions/..., breaking the import. Always pass env: { MSYS_NO_PATHCONV: "1" } in the run_command call: `` mcp__claude-skills-cli__run_command { cli: "terraform", args: ["import", "azurerm_resource_group.rg", "/subscriptions//resourceGroups/"], cwd: "", env: { MSYS_NO_PATHCONV: "1" } } ` **Prefer import {} blocks** over CLI import loops — they are written as HCL to imports.tf` and are not subject to shell path mangling.

5. Write a run-log entry

Append to /.claude//run-log.md:

## Preflight — 
- az login: ✓ 
- SSH key: RSA-4096 at 
- RG : exists=
- Resources found:  (import blocks written to imports.tf)
- TF version: 

6. Hand-offs

  • terraform plan errors after preflight → terraform-plan-review
  • 403 / AuthorizationFailed → azure-rbac-diagnostics
  • CI pipeline failures → ci-pipeline-debug

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.