feat: add multichain support to endpoint resource#71
Merged
Conversation
Adds an optional `multichain` boolean attribute to the `quicknode_endpoint` resource. Wires the QuickNode Admin API enable_multichain and disable_multichain endpoints into Create/Update, and reads the current state back via the `is_multichain` field on the show endpoint response so drift is detected. Side effects from `make vendor`: - Refresh of api/quicknode/openapi.json and the generated client, which adds `is_multichain` (plus other new fields like `name`, `is_dedicated`, `is_flat_rate`, `status`) to the endpoint types. - Refresh of api/streams/streams-openapi.json and the generated client. - Local rename of a duplicate `deleteTag` operationId (two different paths upstream share the same id) to unblock code generation. Tests: - Unit tests for the new setMultichain helper covering enable/disable success, transport errors, and non-200 responses.
seanl-circle
approved these changes
May 7, 2026
andreclaro
pushed a commit
that referenced
this pull request
May 8, 2026
🤖 I have created a release *beep* *boop* --- ## [0.8.0](v0.7.2...v0.8.0) (2026-05-08) ### Features * add multichain support to endpoint resource ([#71](#71)) ([fae6895](fae6895)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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
Adds an optional
multichainboolean attribute to thequicknode_endpointresource, wiring the QuickNode Admin APIenable_multichainanddisable_multichainendpoints into Create/Update.Read reconciles
data.multichainfrom theis_multichainfield on the show-endpoint response, so drift is detected if multichain is toggled outside Terraform.Changes
multichainattribute onquicknode_endpoint(optional, defaultfalse).Createenables multichain whenmultichain = true. State is saved before the enable call so a failure leaves the caller with a valid resource id to recover from rather than orphaning the endpoint in QuickNode.Updatecalls enable/disable based on the diff between plan and prior state. Diff usesValueBool()comparison so upgrading a state file where the attribute is null tofalsedoes not trigger a spurious disable.Readpopulatesmultichainfromis_multichainon the API response.setMultichaintreats a(nil, nil)response from the client as an explicit internal error instead of a misleadingstatus 0 / empty bodydiagnostic.examples/multichain-endpoint/.setMultichaincovering enable/disable success, transport errors, non-200 responses, and nil responses. Plus a test for the null-vs-false diff logic. All added to the existingendpoint_resource_test.go.Side effects from
make vendorapi/quicknode/openapi.jsonand its generated client were refreshed, which addsis_multichain(plus incidental new fields likename,is_dedicated,is_flat_rate,status) to the endpoint types.api/streams/streams-openapi.jsonand its generated client also refreshed —make vendorrefreshes both together.deleteTagoperationId for two distinct paths, which trips up oapi-codegen. Thevendortarget now patches the spec in-flight with jq to rename the account-level op todeleteAccountTaguntil upstream fixes it. A comment in the Makefile documents this so the next refresh does not silently regress. Worth flagging to QuickNode separately.Test plan
go test ./...passes locally (includes new unit tests).go vet ./...passes.make generateregenerates docs cleanly (docs/resources/endpoint.mdupdated).dev_overrides: Read correctly reconciles state from the API and plan diffs surface bothtrue -> falseandfalse -> truedrift on real endpoints. No-op plans where config already matches the API, as expected.