hashicorp / hashicorp/packer-plugin-amazon
failing to ssh into a FreeBSD AMI post packer build
- Dominant language
- Go
- Stars
- 91
- Forks
- 141
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 3
Description
_This issue was originally opened by @david-peters-aitch2o as hashicorp/packer#10854. It was migrated here as a result of the [Packer plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737). The original body of the issue is below._
#### Overview of the Issue
with an extremely simple build, booting the ec2-instance it will fail to ssh in
#### Reproduction Steps
build with the following file:
```json
{
"variables": {
"DB_USERNAME": "{{env `DB_USERNAME`}}",
"DB_PASSWORD": "{{env `DB_PASSWORD`}}"
},
"builders": [{
"type": "amazon-ebs",
"region": "ap-southeast-2",
"profile": "test-workspace-dev",
"source_ami": "ami-0e0a9bebd811801a4",
"instance_type": "t2.medium",
"ssh_username": "ec2-user",
"ami_name": "instance {{timestamp}}",
"ssh_timeout": "15m",
"user_data_file": "user_data.txt"
}]
}
}
```
user_data.txt file contains
```shell
#!/bin/sh
env ASSUME_ALWAYS_YES=YES pkg install sudo python bash bash-completion
```
deploy from above AMI and trying to ssh in with your keys will fail, deploy from the ami-0e0a9bebd811801a4 AMI, ssh with your keys and it works
### Packer version
[INFO] Packer version: 1.7.0 [go1.15.8 linux amd64]
### Simplified Packer Buildfile
see above
### Operating system and Environment details
OS is FreeBSD 12
base AMI is ami-0e0a9bebd811801a4
### Log Fragments and crash.log files
logs are fine as it builds as expected
Contributor guide
Assessment
This issue has not been assessed yet.