Packer: config for VPC creates temporary group in EC2 Classic instead of in VPC

Created on 20 Jun 2016  路  4Comments  路  Source: hashicorp/packer

We have quite old AWS account which still has access to EC2 Classic infrastructure in AWS.

Steps to reproduce:

  • use AWS account with EC2 Classic infra
  • use parameter file + template file wich use VPC settings, pass valid parameters, where:
    -- leave creation of the temporary security group to packer
    -- use ec2 instance type which can be launched only in VPC
  • execute packer
  • see how packer creates temporary security group in EC2 Classic (attached aws-cli dump as , shows that there is no "VpcId", so this is EC2 Classic sg)
  • creation of the instance fails.

We have not yet tried to define specific security group for packer.

bug buildeamazon

All 4 comments

I'm encountering a similar problem using packer 0.10.1 on FreeBSD with the example image config from the getting started guide:

https://gist.github.com/xenophonf/2f04e2527c4ed3ba049414012b29baac

If I set the subnet ID to one of my VPC subnets, I get a different error:

https://gist.github.com/xenophonf/74092b269fa3ef5df89345f768fd5ded

If I switch the image config to another region (and after updating the AMI as appropriate), everything works as expected - Packer deploys the instance, shuts it down, converts it to an AMI, and cleans up.

hmm, I can only assume this has been fixed since 0.10.0, since there've been a number of people who have reported successfully building packer in an old aws account without a default VPC.

Going to close this, but if you're still hitting this problem, will you please open a new issue and run packer with the PACKER_LOG=1 env var set, and upload the logs?

I didn't realize this at the time, but one can ask AWS support to disable EC2-Classic, which I did later.

Unfortunately we still got some ancient infrasturucture on EC2-Classic, so it's not a valid solution ;)

Was this page helpful?
0 / 5 - 0 ratings