Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent force replacing resources when import value in state is nil #1054

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

kherock
Copy link
Contributor

@kherock kherock commented Jan 3, 2025

Fixes #1053. I believe that Terraform state older than v4.0.0 with keycloak_openid_client resources is also impacted by this, so I've tried to address include a fix for those as well.

@kherock kherock changed the title Prevent force re-creating resources when import value in state is nil Prevent force replacing resources when import value in state is nil Jan 3, 2025
@kherock kherock force-pushed the fix-import-forcenew branch from 3a3733e to 60c4586 Compare January 3, 2025 20:36
Signed-off-by: Kyle Herock <kherock@gmail.com>
@kherock kherock force-pushed the fix-import-forcenew branch from 60c4586 to 44dc683 Compare January 3, 2025 20:38
@denniskniep
Copy link
Contributor

@kherock I solved it here by removing the default value of the import property. Not sure which is the better approach.
Plz treat it simply as another option

@kherock
Copy link
Contributor Author

kherock commented Jan 3, 2025

This PR's approach is slightly better in that it allows for someone to add an explicit import = false argument to these resources without the provider planning to replace the resource.

@denniskniep
Copy link
Contributor

Yeah, that makes sense.
Thanks for your fix 👍

Copy link
Contributor

@sschu sschu left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@sschu sschu merged commit d649d8e into keycloak:main Jan 6, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Existing Role & User are forced for replacement with new introduced import property
3 participants