Skip to content

Instantly share code, notes, and snippets.

@rnhurt
Created August 13, 2019 17:48
Show Gist options
  • Save rnhurt/d48d9f64ca8db853b3628321521ed15f to your computer and use it in GitHub Desktop.
Save rnhurt/d48d9f64ca8db853b3628321521ed15f to your computer and use it in GitHub Desktop.
InvalidParameterValue Error using the "amazon-ebs builder" #7981
{
"variables": {
"ami_name": "",
"build_id": "",
"aws_region": "us-east-1",
"copy_aws_region": "us-east-2",
"ec2_instance_type": "",
"instance_profile": "",
"encrypt": "",
"kms_cmk": "",
"app_name": "base",
"source_ami": "",
"ssh_keypair_name": "",
"ec2_key_file": "",
"subnet_id": "",
"availability_zone": "",
"vpc_id": ""
},
"builders": [{
"type": "amazon-ebs",
"availability_zone": "{{user `availability_zone`}}",
"encrypt_boot": "{{user `encrypt`}}",
"kms_key_id": "{{user `kms_cmk`}}",
"region": "{{user `aws_region`}}",
"source_ami": "{{user `source_ami`}}",
"instance_type": "{{user `ec2_instance_type`}}",
"spot_price": "auto",
"spot_price_auto_product": "Linux/UNIX (Amazon VPC)",
"ssh_username": "ec2-user",
"ssh_keypair_name" : "{{user `ssh_keypair_name`}}",
"ssh_private_key_file" : "{{user `ec2_key_file`}}",
"ami_name": "{{user `ami_name`}}",
"iam_instance_profile": "MyPackerBuildProfile",
"disable_stop_instance": "{{user `disable_instance`}}",
"tags": {
"Name": "packer-{{user `app_name`}}-{{user `env_name`}}",
"Project": "packer",
"Environment": "{{user `env_name`}}",
"BuildId": "{{user `build_id`}}"
},
"spot_tags": {
"Name": "packer-{{user `app_name`}}-{{user `env_name`}}",
"Encrypted": "{{user `encrypt`}}",
"ParentAmi": "{{user `source_ami`}}",
"Application": "{{user `app_name`}}",
"Environment": "{{user `env_name`}}",
"BuildId": "{{user `build_id`}}"
},
"run_tags": {
"Name": "packer-{{user `app_name`}}-{{user `env_name`}}",
"Project": "packer",
"Environment": "{{user `env_name`}}",
"BuildId": "{{user `build_id`}}"
},
"run_volume_tags": {
"Name": "packer-{{user `app_name`}}-{{user `env_name`}}",
"Project": "packer",
"Environment": "{{user `env_name`}}",
"BuildId": "{{user `build_id`}}"
},
"subnet_id": "{{user `subnet_id`}}",
"vpc_id": "{{user `vpc_id`}}"
}],
"provisioners": [
{
"type": "shell",
"inline":[
"sudo /usr/bin/pip install ansible==2.7.10"
]
},
{
"type": "ansible-local",
"playbook_file": "packer.yml",
"playbook_dir": ".",
"extra_arguments": [ "-e", "build_id={{user `build_id`}}", "-{{user `verbosity`}}" ]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment