Fix host state drift in nsxt_proxy_config - #2281
Open
ksamoray wants to merge 1 commit into
Open
Conversation
ksamoray
force-pushed
the
cherrypick/branch_3122-2211
branch
from
September 3, 2026 09:40
fbce9e1 to
9931e21
Compare
When enabled is set to false and host is omitted from the HCL
configuration, the provider sets a default host placeholder
('proxy.example.com') to satisfy NSX Manager API requirements.
Because host was defined as Optional: true without Computed: true,
Terraform detected perpetual state drift on plan / apply when
reading back the provider-assigned default value.
Mark host as Computed: true in the schema so Terraform treats the
injected default value as expected, eliminating drift.
ksamoray
force-pushed
the
cherrypick/branch_3122-2211
branch
from
September 8, 2026 10:57
9931e21 to
bec1e2f
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
enabledis set to false andhostis omitted from the HCL configuration, the provider sets a default host placeholder (proxy.example.com) to satisfy NSX Manager API requirements.hostwas defined asOptional: truewithoutComputed: true, Terraform detected perpetual state drift on plan / apply when reading back the provider-assigned default value.hostasComputed: truein the schema so Terraform treats the injected default value as expected, eliminating drift.Found during a follow-up pass — this PR was missed by the original commit-by-commit audit of master's bug fixes; not part of any previously-excluded cluster.
Test plan
go build ./...go vet ./...gofmt -l .(clean)golangci-lint run ./nsxt/(0 issues)Direct, unmodified port — no test files touched in the source PR.