I'm trying to export an ovf from an EC2 instance on AWS and I have a question about the post-processor. I would THINK the post-processor would execute before the instance is terminated. My plan was to call a script to use aws cli to export the instance as an ovf (which then saves the ovf to a bucket in s3. The problem seems to be that the aws command is to create the ovf from an INSTANCE (see https://docs.aws.amazon.com/cli/latest/reference/ec2/create-instance-export-task.html) but by the time the post-processor gets to it, packer has already terminated the instance on AWS and all I'm left with is an AMI. I would like to avoid spinning the AMI back up into an instance, then exporting the instance if I can avoid it. Is there some way I can tell packer to keep the instance up (or at least not terminated and deleted) until I can export the OVF? Another question I have is about the builder itself. Is there some way I can get the instance ID from the builder? It displaces the instance id when first building, and that would be useful since I need it for the export command. All I know how to get is the ami id (aws ec2 describe-images --<stuff>).
-- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/packer/issues IRC: #packer-tool on Freenode --- You received this message because you are subscribed to the Google Groups "Packer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/077d6b3b-901a-4f3a-86d8-e496a8732b2c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
