HashiCorp Packer templates for building AWS AMIs and machine images with automated provisioning.
| Template | Description | Provider |
|---|---|---|
ami-aws.json |
Base AWS AMI with custom provisioning | AWS EBS |
aws-1.json |
AWS machine image configuration #1 | AWS EBS |
aws-2.json |
AWS machine image configuration #2 | AWS EBS |
redis-ami.json |
Redis server AMI template | AWS EBS |
redis-ami-digitalocean.json |
Redis server image for DigitalOcean | DigitalOcean |
# Clone the repo
git clone https://github.com/hammadhaqqani/packer.git
cd packer
# Validate a template
packer validate ami-aws.json
# Build an AMI
packer build ami-aws.json
.
├── ami-aws.json # Base AWS AMI template
├── aws-1.json # AWS image config #1
├── aws-2.json # AWS image config #2
├── redis-ami.json # Redis AMI for AWS
├── redis-ami-digitalocean.json # Redis image for DigitalOcean
├── first.sh # Provisioning shell script
├── welcome.txt # Welcome message for instances
└── .github/workflows/
├── packer.yml # CI: packer validate + fmt check
└── pages.yml # GitHub Pages deployment
Every push runs automated validation via GitHub Actions:
packer fmt -check — Ensures consistent template formatting.packer validate — Validates template syntax and configuration.Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Hammad Haqqani — DevOps Architect & Cloud Engineer
If you find this useful, consider buying me a coffee!