Skip to content

Update packer scripts to remove disks on termination #1745

Closed
@ScottGuymer

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

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