Skip to content

Commit 05c8368

Browse files
Clarify workaround conditions
1 parent 2ee1a9a commit 05c8368

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pkg/tfbridge/typechecker/typechecker.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ func (v *TypeChecker) validatePropertyValue(
162162
switch typeSpec.Type {
163163
case "boolean":
164164
// Check for strings that are values "true" or "false".
165-
// These are handled as booleans in the bridge, so they should be skipped by the type checker.
165+
//TODO: Remove the boolString condition when https://github.com/pulumi/pulumi-terraform-bridge/issues/2520
166+
// is resolved. This is a workaround for the config encoding not honoring type overrides.
166167
var boolString bool
167168
if propertyValue.IsString() {
168169
if propertyValue.StringValue() == "true" || propertyValue.StringValue() == "false" {

pkg/tfbridge/typechecker/typechecker_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,6 +1632,9 @@ func TestValidateConfigType(t *testing.T) {
16321632
}),
16331633
},
16341634
{
1635+
//TODO: Remove this test when https://github.com/pulumi/pulumi-terraform-bridge/issues/2520 is resolved.
1636+
// This tests a workaround path to keep the type checker from tripping on missing functionality in the
1637+
// config encoding and will fail once that is fixed.
16351638
name: "allows_bool_strings",
16361639
inputName: "skipMetadataApiCheck",
16371640
input: resource.PropertyValue{V: "true"},

0 commit comments

Comments
 (0)