I’ve had some issues with the “IIS Website - Create” step, generating an error on line 439.
We’re generating a variable number of bindings, depending on the environment. Most of the binding settings are bound to Octopus variables, including a variable that decides whether a certain binding is enabled.
After looking at the source code, it appears that the “enabled” variable is actually evaluated last of all on line 461. I would suggest checking that variable first, before doing anything else.
Now I need to set the variable that determines whether SNI is required, even for environments that have the binding disabled altogether. This leads to more set values for variables, even though they are not actually used. Evaluating the
$binding.enabled first, would allow everything else to be skipped conditionally, so the parsing of other booleans earlier in the loop does not fail unexpectedly.