Skip to content

Fix Firestore field deletion for wildcard fields #21034

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

Conversation

modular-magician
Copy link
Collaborator

You can update index configs for wildcard fields, but you can't update TTL configs. When we "delete" SFIs, we actually issue a PATCH with empty index and TTL configs. We put both indexConfig and ttlConfig in the update mask for this PATCH accordingly.

For wildcard fields, simply exclude ttlConfig from the update mask when issuing this PATCH to avoid the "unsupported" error.

Fixes #20397

firestore: fixed deletion of wildcard fields in `google_firestore_field`

Derived from GoogleCloudPlatform/magic-modules#12856

[upstream:7d08e89ac8686de13d9fdc30dc1f557925c3004d]

Signed-off-by: Modular Magician <[email protected]>
@modular-magician modular-magician requested a review from a team as a code owner January 24, 2025 16:57
@modular-magician modular-magician merged commit 7f431f7 into hashicorp:main Jan 24, 2025
2 checks passed
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 24, 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.

firestore_field: unable to delete after applying the resource
1 participant