Skip to content

Update packer scripts to remove disks on termination #1745

Closed

Description

@ScottGuymer

Responding to myself after noticing by looking at the AMI that it had "Delete on termination" set to "No"
Screen Shot 2022-02-11 at 11 55 46 AM

In /mages/ubuntu-focal/github_agent.ubuntu.pkr.hcl, I updated to:

  launch_block_device_mappings {
    device_name           = "/dev/sda1"
    volume_size           = var.root_volume_size_gb
    volume_type           = "gp3"
    delete_on_termination = true
  }

Originally posted by @Fgerthoffert in https://github.com/philips-labs/terraform-aws-github-runner/discussions/1742#discussioncomment-2158915

Activity

  1. toast-gear commented on Feb 14, 2022

    @toast-gear
    Contributor

    Yeh, we noticed this today and were going to raise a PR to fix it tomorrow (I don't mind who raises the PR). A default of true makes much more sense than false for GitHub Actions runners, apparently the default in Packer is false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions