Skip to content

paloth/ami-builder

Repository files navigation

AMI Builder

This repo contains the base to create an Aws AMI builder with packer.

Inputs

Name Description Type Default Required
ami_name Your aws AMI name string n/a yes
os_version Your aws AMI version string n/a yes
subnet_id The subnet Id to use to build your aws AMI string n/a yes
vpc_id The vpc Id to use to build your aws AMI string n/a yes
communicator The configuration for the ssh communicator
object({
communicator = string
port = number
username = string
})
{
"communicator": "ssh",
"port": 22,
"username": "ec2-user"
}
no
instance_type The instance type to use to build your aws AMI string "t3.micro" no
profile Your aws profile (Must have the EC2 access right) string "default" no
region The aws region where you want to build your aws AMI string "eu-west-1" no
source_ami_filter The filter parameters to find the source aws AMI
object({
virtualization = string
regex = string
device = string
owners = list(string)
})
{
"device": "ebs",
"owners": [
"amazon"
],
"regex": "amzn2-ami-hvm-2.0.*-gp2",
"virtualization": "hvm"
}
no
tags Your aws AMI tags map(string) {} no

Files

Source

This file contains the packer builder ready to setup the build. All the information must be provided into a .pkvars.hcl to define each required variable value.

Variable

This file contains every variable defintion with the type and default value.

Build

This file contains the different provider you want to use to setup your AMI.

Pkvars

This file contains every value you want to set to your build and to configure your aws AMI. You can create a .auto.pkvars.hcl if you want packer read it automatically.

More information

You can find more information about Hashicorp Packer here.

About

Packer HCL2 builder for AWS AMI

Topics

Resources

License

Stars

Watchers

Forks

Languages