Skip to content

Conversation

@JEETDESAI25
Copy link

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

Closes #202

When using smtp_pass in auth config, Terraform fails with "Provider produced inconsistent result after apply" because readAuthConfig() marshals the API response (AuthConfigResponse) with different JSON tags than the update schema (UpdateAuthConfigBody), causing state mismatch.

What is the new behavior?

  • Both readAuthConfig() and updateAuthConfig() now convert API responses to UpdateAuthConfigBody before persisting state, ensuring consistent JSON marshaling.
  • Added convertAuthResponse() and copySensitiveFields() helpers to handle type conversion and preserve write-only fields. Includes regression test with request validation.

Additional context

All tests pass (7/7). Verified with golangci-lint (0 issues).

@JEETDESAI25 JEETDESAI25 requested a review from a team as a code owner November 24, 2025 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provider produced inconsistent result after apply in auth SMTP settings

1 participant