fix: remove connection_id default of 0 in dbtcloud_environment (closes #665)#667
Open
trouze wants to merge 3 commits into
Open
fix: remove connection_id default of 0 in dbtcloud_environment (closes #665)#667trouze wants to merge 3 commits into
trouze wants to merge 3 commits into
Conversation
…#665) Removes Default: int64default.StaticInt64(0) from the connection_id schema attribute and replaces scattered nil/0 checks with a connectionIDFromAPI helper that treats both nil and 0 as null in Terraform state. Fixes the "inconsistent result after apply" error when the dbt Cloud API auto-assigns a non-zero connection ID. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
After removing the default of 0 from connection_id, the API value of 0 is now treated as null in state. Update the assertion accordingly. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.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.
Summary
Default: int64default.StaticInt64(0)fromconnection_idindbtcloud_environmentschemaconnectionIDFromAPI(*int) types.Int64helper that maps bothniland0from the API totypes.Int64Null()in Terraform stateconnection_idPrevents the "inconsistent result after apply" error that occurs when the dbt Cloud API auto-assigns a non-zero connection ID after create.
Closes #665
🤖 Generated with Claude Code