Hi,
I’m trying to create aws ami image using packer, please find the json file. Here in my code I’m trying to use private_ip while running this code im getting
Waiting for SSH to become available…
Timeout waiting for SSH.
Could you please help me on this issue.
``
{
“variables”: {
“aws_access_key”: “{{env AWS_ACCESS_KEY
}}”,
“aws_secret_key”: “{{env AWS_SECRET_KEY
}}”
},
"builders": [
{
"access_key": "{{user `aws_access_key`}}",
"instance_type": "t3.medium",
"region": "us-west-2",
"ami_name": "linux-image",
"secret_key": "{{user `aws_secret_key`}}",
"source_ami": "ami-*******",
"ssh_username": "root",
"ssh_pty": "true",
"type": "amazon-ebs",
"skip_region_validation": "true",
"vpc_id": "vpc-*****",
"subnet_id": "subnet-*******",
"security_group_id": "sg-*******",
"ssh_interface": "private_ip",
"associate_public_ip_address": "false",
"ssh_timeout": "20m"
}
],
“provisioners”: [
{
“type”: “ansible”,
“playbook_file”: “./playbook.yml”
}
]
}
``