You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are looking to backfill the testsuite to increase our confidence that bridged providers work correctly and derisk rolling out the changes aimed at making the previews more accurate (per Epic).
Create, Delete, Forget are not of interest here, but the other plans are subject to customization based on TF features and are of interest.
Pulumi provider is somewhat limited in influencing the plans picked up by Pulumi, but it has some say in DiffResponse:
It can return changes: DiffResponse_DIFF_NONE
It can return changes: DiffResponse_DIFF_SOME
non-empty DiffResponse.Replaces will indicate a replacement CreateThenDelete replacement
non-empty DiffResponse.Replaces with DeleteBeforeReplace flag set indicate DeleteThenCreate replacement
Looking to ramp up or build a testsuite that lets us know that for a range of possible TF resource schemas, and (R1, R2) resource configuration pairs, the plans picked up by TF match the plans picked up by the bridged provider.
Specific feature of interest: setting ForceNew: true on *schema.Schema is expected to turn Update into replacement plans.
Out of scope: testing ignoreChanges.
The text was updated successfully, but these errors were encountered:
This PR expands the diff cross-tests for SDKv2 and adds test cases for
all TF attribute and block types.
The cross-tests can now match the following against TF:
- creates
- deletes
- replaces with deleteBeforeReplace
- replaces without deleteBeforeReplace
Note that the last two required some workarounds in the cross-tests as
TF and pulumi differ on the order of operations here: TF deletes first
and creates after, while Pulumi defaults to create first and delete
after. This means that in order to match the behaviour we now use the TF
`lifecycle`'s `create_before_destroy`
(https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle#create_before_destroy)
by default and remove it for `deleteBeforeReplace` cases.
This also adds test cases for:
- Create
- Delete
- Update without a diff
- Update with a diff
- Replace
- Replace with deleteBeforeReplace
Each of these is handled for the following TF types
- string
- int
- float
- bool
- list attributes
- set attributes
- maps
- list blocks
- set blocks
fixes#2298
We are looking to backfill the testsuite to increase our confidence that bridged providers work correctly and derisk rolling out the changes aimed at making the previews more accurate (per Epic).
With these OpenTOFU references:
https://github.com/opentofu/opentofu/blob/main/internal/plans/action.go#L11
https://github.com/opentofu/opentofu/blob/main/internal/tofu/node_resource_abstract_instance.go#L1019
The TF plans can be:
Create, Delete, Forget are not of interest here, but the other plans are subject to customization based on TF features and are of interest.
Pulumi provider is somewhat limited in influencing the plans picked up by Pulumi, but it has some say in DiffResponse:
It can return changes: DiffResponse_DIFF_NONE
It can return changes: DiffResponse_DIFF_SOME
Looking to ramp up or build a testsuite that lets us know that for a range of possible TF resource schemas, and (R1, R2) resource configuration pairs, the plans picked up by TF match the plans picked up by the bridged provider.
Specific feature of interest: setting ForceNew: true on *schema.Schema is expected to turn Update into replacement plans.
Out of scope: testing ignoreChanges.
The text was updated successfully, but these errors were encountered: