SCRT-HQ / VaporShell

A PowerShell module for building, packaging and deploying AWS CloudFormation templates
https://vaporshell.io
Apache License 2.0
48 stars 9 forks source link

Add-ConIf does not allow bool #81

Closed indented-automation closed 4 years ago

indented-automation commented 4 years ago

Description

Add-ConIf -ConditionName IsActiveRegion -ValueIfTrue $true -ValueIfFalse $false

Steps to reproduce

Add-ConIf -ConditionName SomeConditionName -ValueIfTrue $true -ValueIfFalse $false

Expected result

A template should be generated like:

"Fn::If": [
    "SomeConditionName ",
    true,
    false
]

Actual result

An error is raised with an obscure parameter reference.

Add-ConIf: The ValueToImport parameter only accepts the following types: Vaporshell.Condition.If, Vaporshell.Function.Base64, Vaporshell.Function.FindInMap, Vaporshell.Function.GetAtt, Vaporshell.Function.GetAZs, Vaporshell.Function.Join, Vaporshell.Function.Select, Vaporshell.Function.Ref, System.String. The current types of the value are: System.Boolean, System.ValueType, System.Object.
scrthq commented 4 years ago

Coming up soon @indented-automation !

image

scrthq commented 4 years ago

Fix deployed with version 2.13.0.20200731!

image