Hello,
I’m new to Packer and I'm trying to run the Packer amazon-ebs builder demo. I modified the template to include vpc, subnet, and security group:
{
"variables": {
"aws_access_key": "",
"aws_secret_key": ""
},
"builders": [{
"vpc_id": "vpc-0d082b1de108c6a62",
"subnet_id": "subnet-07212687cf82e3342",
"security_group_id": "sg-03fde06f0b030638b",
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "us-west-2",
"source_ami": "ami-095cd038eef3e5074",
"instance_type": "t2.micro",
"ssh_username": "ec2-user",
"ami_name": "pack-lin-noprovisioning {{timestamp}}"
}]
}
I’m running packer from an instance in the same subnet as the temporary
instance that Packer is creating for the ami and all traffic between the two is
allowed so I don’t think this is a networking or security issue. The ami is
amazon linux.
I can see that the temporary instance fully initializes and stays that way for
some time, but the running template just stays stuck at: “Waiting for SSH to
become available”... until it finally times out. I’m currently looking for a Packer log file
or a way to force Packer to use a specific Key Pair, in the meantime I was
hoping that someone here may have run into this and could offer some help?
Thank You
If I run my build server in a public subnet AND if the Packer template uses the Public IP of my build server this works - However this is not a setup I can use.
Ideally I would like both my build instance and the temporary instance to be in private subnets. At the least I need my build server to remain in a private subnet - which means that the Packer template is going to need to use the private IP of my build server to communicate with the temporary instance. I hope there is a way to specify this.