Suppress site connection info password drift - #2265
Open
ksamoray wants to merge 1 commit into
Open
Conversation
ksamoray
force-pushed
the
cherrypick/branch_3122-2165
branch
from
September 3, 2026 09:40
edb9baa to
aadbe26
Compare
The NSX-T API does not return site node connection passwords in its responses. During read operations, the empty password returned from the API overrides the existing password in the schema, causing Terraform to detect drift and prompt for a perpetual update. Address this by adding the suppressIfEmptyPriorState DiffSuppressFunc to the password field in the connection info schema. This suppresses spurious diffs when the password is empty in the state (such as after an import) while still allowing users to update the password in their configuration.
ksamoray
force-pushed
the
cherrypick/branch_3122-2165
branch
from
September 8, 2026 10:56
aadbe26 to
0f773e4
Compare
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.
Summary
suppressIfEmptyPriorStateDiffSuppressFunc to the password field in the connection info schema. This suppresses spurious diffs when the password is empty in the state (such as after an import) while still allowing users to update the password in their configuration.Test plan
go build ./...go vet ./...gofmt -l .(clean)golangci-lint run ./nsxt/(0 issues)Note: master's source PR added mock-based regression tests, which this branch has no framework for; the production fix is otherwise a direct, unmodified port.