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