Hi,

Could use some help here...I'm trying to control the amazon-ebs builder 
ena_support configuration option with a user variable

The best I can figure out, is there are three possible actions for this 
config options settings:

when:
1)  "ena_support":true  is coded,  an aws api call to 
ModifyInstanceAttribute will turn ENA on.
2)  "ena_support":false  is coded, an aws api call to 
ModifyInstanceAttribute will turn ENA off.
3)  if "ena_support" is not coded at all, ModifyInstanceAttribute will not 
be called at all, so whatever the original ENA support of the source AMI 
will be preserved.

This behavior, in itself, seems weird to me.  should a boolean variable 
really offer three possible outcomes? 

But, besides the confusion above, here's my problem.

I want to control ena_support with a user variable, so I've got the 
following builder:

"variables": {
    "aws_ena_support": "",
  },
  "builders": [
    {
      "type": "amazon-ebs",
        "ena_support": "{{user `aws_ena_support`}}",
        ...
     }
   ]
...

With this setup, I can control actions 1 and 2 no problem, by setting 
aws_ena_support to true/false in a vars file.   But whatever I do, I can't 
seem to find a way to set the  aws_ena_support variable in a way that will  
get action 3.    I tried "",  but that ends up translating to action 2.

Anyone have any ideas?  Is this worthy of an raising a github issue?  Seems 
the only way to get action 3 is to not code the the ena_support 
configuration option in the builder at all.  If there's a way to control 
this with a variable, please let me know...

-Dave


-- 
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/75d7dba3-8fa6-44f2-bb89-ae5a707c4359%40googlegroups.com.

Reply via email to