- Home
- Skills
- Hashicorp
- Agent Skills
- Azure Image Builder
azure-image-builder_skill
- Shell
196
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill hashicorp/agent-skills --skill azure-image-builder- SKILL.md4.1 KB
Overview
This skill builds Azure managed images and Azure Compute Gallery images using Packer's azure-arm builder. It automates VM provisioning, software installation, and image capture so you get repeatable, versioned VM images for Azure. Use it to produce custom Linux or Windows images optimized for deployment at scale.
How this skill works
The skill configures an azure-arm Packer source with Azure credentials, base image details, VM size, and location. It runs a temporary build VM, applies provisioners (shell, scripts, or configuration management), then either creates a managed image or publishes a version into an Azure Compute Gallery. Authentication uses a Service Principal or Azure CLI/Managed Identity.
When to use it
- Create standardized golden images for production or testing environments.
- Publish versioned images to Azure Compute Gallery for regional replication and scale.
- Automate OS hardening, software installs, and configuration before VM deployment.
- Replace manual VM cloning with repeatable, automated image builds.
- Integrate image creation into CI/CD pipelines for immutable infrastructure.
Best practices
- Use a Service Principal with least-privilege roles or managed identity to limit scope.
- Keep image versions immutable; include timestamp or build number in the version string.
- Minimize the number of provisioner steps in the image; offload ephemeral setup to startup scripts where possible.
- Use shared image gallery for regional replication and to manage image lifecycle.
- Monitor build costs and cleanup temporary resources to avoid unexpected charges.
Example use cases
- Build a hardened Ubuntu image with corporate packages and security patches applied.
- Publish a webserver image to Compute Gallery with versions per release date for blue/green deployments.
- Automate Windows Server image creation with preinstalled roles and configuration.
- Integrate Packer image builds into CI pipelines to produce artifact versions per commit.
FAQ
Use a Service Principal (ARM_CLIENT_* env vars) or enable Azure CLI/managed identity by setting use_azure_cli_auth. Ensure the identity has appropriate Contributor or specific resource permissions.
How do I avoid image version conflicts in Compute Gallery?
Image versions are immutable. Use unique version strings (date + build number) or increment versions per build to prevent collisions.