Skip to main content

Packer build integration

I would like to be able to run packer builds via Spacelift. More specifically, I am trying to create an EBS snapshot containing docker images as a sort of image cache. These snapshots will then be attached to an EKS node when the node is created.

Workaround
Problem
Status: ❌ Rejected4 comments

Log in to comment and vote

Comments4

  • Black Breeze

    •

    Jun 11, 2025

    Thanks for the Packer feature request! While we don't have plans for native Packer support due to market size and licensing considerations, you can achieve excellent results using OpenTofu/Terraform to orchestrate Packer builds. The pattern is straightforward: ```hcl resource "null_resource" "ami_build" { triggers = { template_hash = filemd5("${path.module}/packer-template.pkr.hcl") } provisioner "local-exec" { command = "packer build -var 'source_ami=${var.base_ami}' packer-template.pkr.hcl" } } data "external" "ami_id" { program = ["bash", "-c", "packer build -machine-readable template.pkr.hcl | awk -F, '$3 == \"artifact\" && $5 == \"id\" {print \"{\\\"ami_id\\\":\\\"\" $6 \"\\\"}\"}'"] depends_on = [null_resource.ami_build] } ``` This gives you: - Spacelift's governance, policies, and audit trail - Automatic builds on template changes - AMI IDs captured as outputs for downstream stacks - Full integration with your existing workflows You'll get the orchestration benefits without waiting for a dedicated integration.
  • Blush Wave

    •

    May 8, 2025

    Would you happen to have suggestions for alternative ways to build AMIs or EBS snapshots that Spacelift would support?

  • Black Breeze

    •

    May 8, 2025

    Thanks for the thoughtful request—and for outlining your current workflow and goals so clearly.

    Unfortunately, we won’t be adding support for Packer builds in Spacelift. Packer is no longer an FOSS tool. Also, unlike OpenTofu for Terraform, no such alternative exists for Packer. Committing to supporting it in the current situation does not align with our goals and principles.

    Other than supporting Packer, is there anything we can do to make your life easier in this particular case?

  • Amaranth Dew

    •

    Apr 8, 2025

    We have Packer builds as well and have to write CI jobs to trigger them ourselves. This could be really nice to have!