Here is my packer template. I am trying to pass command line arguments for packer build of type cloud. But I am getting error
{
"variables": {
"cloud_provider": "",
"image_id": ""
},
"builders": [{
"type": "{{user `cloud_provider`}}",
"region": "us-west-2",
"source_ami": "{{user `image_id`}}",
"instance_type": "t2.micro",
"vpc_id":"xxxx-80d4",
"ssh_username": "ec2-user",
"subnet_id": "xxxx-4d",
"security_group_id": "xxx-14f5",
"ami_name": "JENKINS_PACKER_{{timestamp}}",
"tags": {
"Key": "Name",
"Value": "JENKINS_PACKER_{{timestamp}}"
}
}],
"provisioners": [
{
"type": "shell",
"inline": [
"sleep 10",
"sudo yum -y update",
"sudo yum -y install java-1.8.0-openjdk.x86_64",
"sudo python get-pip.py",
"sudo pip install --upgrade awscli"
]
}
]