Skip to content

Conversation

@austinvalle
Copy link
Member

@austinvalle austinvalle commented May 7, 2025

This PR introduces a change to import configuration building of identities to account for the scenario where an OptionalForImport attribute.

It's technically valid for any identity attribute to be null, regardless of the behavior field set, but if a provider developer wants to test import via identity for a different scenario, where the attribute is provided in import, they can always create a custom config.


Test failure without the change:

--- FAIL: TestImportBlock_WithResourceIdentity_NullAttribute (1.36s)
panic: unexpected type <nil> for identity value "value_we_dont_always_need" [recovered]
	panic: unexpected type <nil> for identity value "value_we_dont_always_need"

@austinvalle austinvalle added this to the v1.13.0 milestone May 7, 2025
@austinvalle austinvalle changed the title (WIP) - Fix panic when identity attribute is null ImportState: Fix panic when identity attribute is null May 7, 2025
@austinvalle austinvalle marked this pull request as ready for review May 7, 2025 21:45
@austinvalle austinvalle requested a review from a team as a code owner May 7, 2025 21:45
@austinvalle austinvalle requested a review from bbasata May 8, 2025 12:02
Copy link
Collaborator

@bbasata bbasata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@austinvalle austinvalle merged commit 7d612fb into main May 8, 2025
40 checks passed
@austinvalle austinvalle deleted the av/fix-identity-assertions branch May 8, 2025 12:26
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants