direct: keep the state entry when an update empties a resource - #6456
Draft
shreyas-goenka wants to merge 1 commit into
Draft
direct: keep the state entry when an update empties a resource#6456shreyas-goenka wants to merge 1 commit into
shreyas-goenka wants to merge 1 commit into
Conversation
An update that emptied a resource dropped its state entry. The next plan then saw no state and an empty config, skipped the node, and never compared it against the remote - so `grants: []` revoked once and stopped enforcing. Add a grant out of band afterwards and it survived every later deploy. Saving the empty state keeps the node planned, so the remote is compared each time and the list stays enforced. The resource is still there: the schema keeps existing, it just grants nothing. Terraform has the same hole and is left as is, so remove_all's plan output and the new test's grants read are per-engine now. Co-authored-by: Isaac <no-reply@databricks.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An update that empties a resource dropped its state entry, so the next plan saw no state and an empty config, skipped the node, and never compared it against the remote.
grants: []therefore revoked once and then stopped enforcing: add a grant out of band afterwards and it survived every later deploy.Saving the empty state keeps the node planned, so the remote is compared each time and the list stays enforced. New test
grants/schemas/empty_list_enforcedcovers that out-of-band case on cloud.Terraform has the same hole and is unchanged here, so the two goldens it affects are per-engine now.
This pull request and its description were written by Isaac.