Skip to content

Commit

Permalink
podvm: Set shutdown behavior for aws packer image creation
Browse files Browse the repository at this point in the history
to prevent leaving stopped VMs if Packer execution is unexpectedly interrupted
see: https://developer.hashicorp.com/packer/integrations/hashicorp/amazon/latest/components/builder/ebs#run-configuration

Signed-off-by: Snir Sheriber <ssheribe@redhat.com>
  • Loading branch information
snir911 committed Jan 16, 2025
1 parent c1b26f1 commit b89ad54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cloud-api-adaptor/aws/image/rhel/aws-rhel.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ source "amazon-ebs" "rhel" {
volume_size = "${var.volume_size}"
}

ssh_username = "ec2-user"
ssh_username = "ec2-user"
shutdown_behavior = "terminate"
}

build {
Expand Down

0 comments on commit b89ad54

Please sign in to comment.