I have a module which accepts boolean as one of the values. But my boolean is dynamic. Created using Op.neq(…,…). Right now I can do it only using override on built module.
We’ve got functions for converting IResolvable to Number (Token.asNumber), … Why don’t we have something like Token.asBoolean?
Internally tokens rely on using values that are unlikely to be used by end users. For strings a special character sequence is used and for numbers large magnitude negative numbers. Booleans only have 2 possible values so it isn’t possible to encode additional information.
For that reason, most spots that accept
boolean also accept
IResolvable in order to encode the additional information necessary to maintain the correct links.
I thought it might be something like this. But unfortunately you cannot use IResolvable when you generate interface for your terraform modules.
I created an issue to track this.