Skip to content

Adding volume handling options for Packer. #1508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions roles/aws/aws_ami/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ aws_ami:
owner: "136693071363" # Global AWS account ID of owner, defaults to Debian official
ssh_username: "admin"
encrypt_boot: false
# EBS volume options
device_name: /dev/xvda # default for Debian AMIs
volume_type: gp3
volume_size: 20
#vpc_filter: "example" # If defined, Packer will search for a VPC with the `Name` tag of the value given. vpc_id takes precednece over this if both are defined. This also assumes the VPC is not the default and has a CIDR block of /16.
vpc_filter: ""
#subnet_filter_az: "a" # If vpc_id and/or vpc_filter are defined, subnet_filter_az MUST be defined and must match an AZ that has public networking.
Expand Down
8 changes: 8 additions & 0 deletions roles/aws/aws_ami/templates/packer.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
"ami_name": "{{ aws_ami.ami_name }}",
"associate_public_ip_address": true,
"encrypt_boot": "{{ aws_ami.encrypt_boot }}",
"launch_block_device_mappings": [
{
"device_name": "{{ aws_ami.device_name }}",
"volume_type": "{{ aws_ami.volume_type }}",
"volume_size": {{ aws_ami.volume_size }},
"delete_on_termination": true
}
]
"source_ami_filter": {
"filters": {
"virtualization-type": "{{ aws_ami.virtualization_type }}",
Expand Down
5 changes: 3 additions & 2 deletions roles/debian/mount_sync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ It will:

- perform an initial rsync using a cloud-init script
- use Unison to perform regular checks (mostly to catch edge-cases where an instance would be spinned up during the middle of a deployment)
<!--TOC-->
<!--ENDTOC-->

<!--TOC-->
<!--ENDTOC-->

<!--ROLEVARS-->
## Default variables
Expand Down