Your source_ami_filters have name twice. Remove one, also try to use source_ami to verify that the problem isn't with your filter.
On Thu, Jul 11, 2019, 19:16 Greg Coit <[email protected]> wrote: > I'm using Packer v1.4.2 btw > > On Thursday, July 11, 2019 at 11:16:19 AM UTC-6, Greg Coit wrote: >> >> I don't need to change anything. Unfortunately, that doesn't work either >> (same error of amazon-ebs: Error launching source instance: >> MissingParameter: The request must contain the parameter size or >> snapshotId). Here's my json file: >> >> { >> "variables": { >> "aws_access_key_id": "", >> "aws_secret_access_key": "" >> }, >> "builders": [{ >> "type": "amazon-ebs", >> "access_key": "{{user `aws_access_key_id`}}", >> "secret_key": "{{user `aws_secret_access_key`}}", >> "region": "us-east-1", >> "vpc_id": "REDACTED", >> "subnet_id": "REDACTED", >> "source_ami_filter": { >> "filters": { >> "virtualization-type": "hvm", >> "name": "*amzn2-ami-hvm-2.0*", >> "name": "*gp2*", >> "platform": "Amazon Linux", >> "architecture": "x86_64", >> "root-device-type": "ebs" >> }, >> "owners": ["137112412989"], >> "most_recent": true >> }, >> "instance_type": "t2.micro", >> "ssh_username": "ec2-user", >> "ami_name": "REDACTED", >> "ami_description": "REDACTED", >> "ami_regions": [ >> "us-east-1", >> "us-west-1", >> "us-west-2", >> "ap-northeast-1", >> "ap-southeast-1", >> "ap-southeast-2", >> "eu-west-1", >> "sa-east-1" >> ], >> "ami_users": [ >> "REDACTED" >> >> ] >> }], >> "provisioners":[ >> { >> "type": "shell", >> "inline": [ >> "sleep 30" >> ] >> }, >> { >> "type": "shell", >> "script": "01_system_repos_and_kernels.sh" >> }, >> { >> "type": "shell", >> "inline": [ >> "sudo /sbin/reboot" >> ] >> }, >> { >> "type": "shell", >> "pause_before": "30s", >> "script": "02_userland_packages.sh" >> }, >> { >> "type": "shell", >> "inline": [ >> "sudo /sbin/reboot" >> ] >> }, >> { >> "type": "shell", >> "pause_before": "30s", >> "scripts": [ >> "91_cleanup.sh" >> ] >> } >> ] >> } >> >> -- > 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/a2ca3001-e101-44a8-be3e-5c5aa0808490%40googlegroups.com > <https://groups.google.com/d/msgid/packer-tool/a2ca3001-e101-44a8-be3e-5c5aa0808490%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CALz9Rt9YBDZW5A-rUxdJbFgHdJPV92Aedt_f-grjd9P30odTZA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
