The official Terraform-compatible
provider for Quicknode. Manage RPC endpoints,
security rules and rate limits with terraform plan and terraform apply.
Requirements
Using the provider
terraform {
required_providers {
quicknode = {
source = "quicknode/quicknode"
version = "~> 0.4.0"
}
}
}
provider "quicknode" {}
resource "quicknode_endpoint" "payments" {
chain = "eth"
network = "mainnet"
label = "payments-prod"
status = "active"
multichain = false
}
Authentication uses a Quicknode API key,
available on paid plans. Set QUICKNODE_API_KEY in the environment; do not
write it into a configuration file.
The provider covers endpoints, the security mechanisms they enforce and who is
allowed past them, RPC method filtering, and rate limits both endpoint-wide and
per method. Endpoints created elsewhere are readable through
data.quicknode_endpoint and data.quicknode_endpoints.
A security mechanism is enabled on the endpoint and the entries it applies to
are separate resources, so an entry added outside Terraform is left alone rather
than deleted on the next apply.
Full resource and attribute reference lives in docs/.
Building
make build
Developing
To run Terraform against a local build, add a development override to
~/.terraformrc:
provider_installation {
dev_overrides {
"quicknode/quicknode" = "/path/to/your/GOPATH/bin"
}
direct {}
}
Then go install . and run Terraform normally. With an override in place,
terraform init is neither needed nor supported.
make lint # gofmt, go vet, golangci-lint
make docs # regenerate docs/ from the provider schema and examples/
make fmt # format Go and Terraform sources
docs/ is generated. CI fails if it is out of date with the schema, so run
make docs after any schema change and commit the result.
The API client in api/admin/ is generated and should not be edited by hand.
See CONTRIBUTING.md for how to refresh it.
Testing
Unit tests need no credentials:
make test
Acceptance tests create real, billable Quicknode resources and require an Admin
API key for a paid account dedicated to testing:
QUICKNODE_API_KEY=... make testacc
Security
Endpoint tokens and credentialed URLs are written to Terraform state. Use
encrypted remote state and treat state files as credential material. See
SECURITY.md to report a vulnerability.
License
MPL-2.0