pulumi / pulumi-confluentcloud

A Confluent Pulumi resource package, providing multi-language access to Confluent
Apache License 2.0
8 stars 3 forks source link

Make Kafka Cluster compatible with XSkipDetailedDiffForChanges #264

Open t0yv0 opened 11 months ago

t0yv0 commented 11 months ago

What happened?

Hello!

Issue details

The Kafka Cluster resource needs tweaking to operate correctly with XSkipDetailedDiffForChanges.

Context: bridge is introducing a change to the diffing algorithm that is currently flagged under XSkipDetailedDiffForChanges but is on the fast track to become turned on unconditionally as it solves important issues for GCP and AWS provider. This change was introduced in: https://github.com/pulumi/pulumi-terraform-bridge/pull/1502

When pre-testing this change through Azure tests, TestBasicClusterPy started failing. It is expected that after a successful pulumi up, the subsequent pulumi preview generates a no-changes plan. With XSkipDetailedDiffForChanges it started to generate an Update plan instead, based on these attributes:

     CHANGING FROM DIFF_NONE to DIFF_SOME
     ~ "basic.#" => {0 1 false false <nil> false false 0}

Investigating this further, the root cause is still unclear, but note that the "basic" parameter is very strange/peculiar, it insists on having an empty object with no schema:

Which then the users have to supply in the code: https://github.com/pulumi/pulumi-confluentcloud/blob/main/examples/basic-kafka-acls/py/__main__.py#L16

Something is not computing the diff for this attribute correctly. Possible ways forward here can be a bridge fix for the diff bug, or working around and avoiding the empty-attribute basic structure.

Affected area/feature

Example

N/A

Output of pulumi about

N/A

Additional context

N/A

Contributing

Vote on this issue by adding a πŸ‘ reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).