I am making AWS AMIs and I want to optinally supply values for the “ami_users” option for the amazon-ebs builder. I tried setting it to null by default, but that causes an error:
Build ‘amazon-ebs’ errored: Error modify AMI attributes: InvalidAMIAttributeItemValue: Invalid attribute item value " " for userId item type.
From my point of view, a missing feature in Packer is the possibility to have a default value for a variable.
On my side, I overcome this limitation by using a Makefile and environment variables to run packer but I plan to open a feature request to have support for default values.