Skip to content
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

Post-processors are not able to run when skip_create_ami is set #513

Open
andyshinn opened this issue Oct 24, 2024 · 2 comments
Open

Post-processors are not able to run when skip_create_ami is set #513

andyshinn opened this issue Oct 24, 2024 · 2 comments

Comments

@andyshinn
Copy link

Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Description

Post-processors are not run when skip_create_ami is true.

Use Case(s)

I am trying to run some EC2 instances to build and download an artifact and then add it to the manifest with the artifice and manifest post-processors. But they don't appear to work when I don't want to keep the AMI with skip_create_ami.

Potential configuration

source "amazon-ebs" "ubuntu-jammy-arm64" {
  ami_name                                  = "package-${source.name}-ruby"
  ssh_username                              = "ubuntu"
  instance_type                             = "m6g.xlarge"
  source_ami                                = data.amazon-ami.ubuntu-jammy-arm64.id
  skip_create_ami                           = true
  force_run_post_processors                 = true
}

Potential References

@lbajolet-hashicorp
Copy link
Contributor

Hi @andyshinn,

I'm not sure what you're trying to do exactly, but from Packer's perspective, a build that doesn't create an AMI does not expose artifacts, so besides post-processors like shell-local, you probably won't be able to run any since there's no artifact to process.

I'm veering towards not classifying this as a bug/enhancement, since it looks fundamentally incompatible with what Packer aims to do, but please feel free to push back on that, there might be a valid use-case that I'm missing here.

Thanks!

@andyshinn
Copy link
Author

Specifically, I am trying to use the artifice post-processor. According to the first couple sentences of the post-processor it seems perfectly normal to want to do something like this: https://developer.hashicorp.com/packer/docs/post-processors/artifice

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

No branches or pull requests

2 participants