I was able to get this working after running the build in debug mode: I was
able to see the IP's that Packer was using and adjust the security groups
accordingly
On Friday, March 8, 2019 at 2:35:23 PM UTC-8, gigit1000 wrote:
>
> 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.
>
>
>
> On Friday, March 8, 2019 at 1:54:56 PM UTC-8, gigit1000 wrote:
>>
>> 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
>>
>
--
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/2378aac3-7315-4fd1-861b-7e99c3dc655b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.