Skip to content

Commit 74af4a3

Browse files
committed
Replace pfutils
1 parent d5bcb8c commit 74af4a3

File tree

3 files changed

+2
-219
lines changed

3 files changed

+2
-219
lines changed

pkg/pf/internal/pfutils/raw_state.go

Lines changed: 0 additions & 28 deletions
This file was deleted.

pkg/pf/internal/pfutils/value_to_json.go

Lines changed: 0 additions & 189 deletions
This file was deleted.

pkg/pf/tfbridge/resource_state.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import (
2929
"github.com/pulumi/pulumi/sdk/v3/go/common/util/contract"
3030

3131
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/convert"
32-
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf/internal/pfutils"
3332
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/reservedkeys"
3433
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge"
3534
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/valueshim"
@@ -257,10 +256,11 @@ func (p *provider) parseAndUpgradeResourceState(
257256
if err != nil {
258257
return nil, fmt.Errorf("[pf/tfbridge] Error calling EncodePropertyMap: %w", err)
259258
}
260-
rawState, err := pfutils.NewRawState(tfType, value)
259+
rawStateBytes, err := valueshim.FromTValue(value).Marshal(valueshim.FromTType(tfType))
261260
if err != nil {
262261
return nil, fmt.Errorf("[pf/tfbridge] Error calling NewRawState: %w", err)
263262
}
263+
rawState := &tfprotov6.RawState{JSON: []byte(rawStateBytes)}
264264

265265
// Before EnableRawStateDelta rollout, the behavior used to be to skip the upgrade method in case of an exact
266266
// version match. This seems incorrect, but to derisk fixing this problem it is flagged together with

0 commit comments

Comments
 (0)