File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,8 @@ func (v *TypeChecker) validatePropertyValue(
161161
162162 switch typeSpec .Type {
163163 case "boolean" :
164- if ! propertyValue .IsBool () {
164+ // The bridge permits the strings "true" and "false" to read as boolean, so allow strings.
165+ if ! propertyValue .IsBool () && ! propertyValue .IsString () {
165166 return []Failure {newTypeFailure (propertyPath , typeSpec .Type , propertyValue )}
166167 }
167168 return nil
Original file line number Diff line number Diff line change @@ -1631,6 +1631,11 @@ func TestValidateConfigType(t *testing.T) {
16311631 })),
16321632 }),
16331633 },
1634+ {
1635+ name : "allows_bool_strings" ,
1636+ inputName : "skipMetadataApiCheck" ,
1637+ input : resource.PropertyValue {V : "true" },
1638+ },
16341639 }
16351640 for _ , tc := range testCases {
16361641 tc := tc
@@ -1661,6 +1666,11 @@ func TestValidateConfigType(t *testing.T) {
16611666 },
16621667 },
16631668 },
1669+ "skipMetadataApiCheck" : {
1670+ TypeSpec : pschema.TypeSpec {
1671+ Type : "boolean" ,
1672+ },
1673+ },
16641674 },
16651675 },
16661676 }
You can’t perform that action at this time.
0 commit comments