Mark effective_file_event_queue as read-only in databricks_external_location#5507
Open
elenathfgs wants to merge 1 commit intodatabricks:mainfrom
Open
Conversation
…l_location` Prevents Terraform drift when the server returns an `effective_file_event_queue` field that the user never specified in their HCL configuration. This is the counterpart to the Universe-side change that adds the `effective_file_event_queue` OUTPUT_ONLY field to ExternalLocationInfo.
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
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.
Changes
Mark the new
effective_file_event_queuefield as read-only in thedatabricks_external_locationresource to prevent Terraform drift.Background
The Unity Catalog backend now returns an
effective_file_event_queuefield onExternalLocationInfo(anOUTPUT_ONLYfield). This is the queue-level counterpart to the existingeffective_enable_file_eventsfield (handled in #5408). Without marking it read-only, Terraform would detect a diff between the API response (which includes the field) and the user's HCL config (which never specifies it).Changes
catalog/resource_external_location.go— AddedSetReadOnly()for"effective_file_event_queue"catalog/resource_external_location_test.go— AddedTestCreateExternalLocationWithEffectiveFileEventQueuethat verifies the API returning a server-populatedeffective_file_event_queuewith a managed SQS queue doesn't cause driftNEXT_CHANGELOG.md— Added bug fix entryNote
This PR depends on a Go SDK update that picks up the new
EffectiveFileEventQueuefield from the Unity Catalog API spec (universe PR already merged). Once the SDK is bumped, the test will compile and pass.Tests
TestCreateExternalLocationWithEffectiveFileEventQueue— mirrors the existingTestCreateExternalLocationWithEffectiveEnableFileEventspatterngo.mod/go.sumonce the SDK release includes the field)