This provider allows for managing Quicknode resources via Terraform. The structure of the repository is outlined below:
- Resources and data sources (
internal/provider/), - Examples (
examples/) - Generated documentation (
docs/),
This provider supports the following resources:
quicknode_endpoint- Manage QuickNode endpoints for blockchain networksquicknode_stream- Manage QuickNode Streams for real-time blockchain data
- Clone the repository
- Enter the repository directory
- Build the provider using the Go
installcommand:
go installThe provider is intended to be configured:
terraform {
required_providers {
quicknode = {
source = "registry.terraform.io/hashicorp/quicknode"
}
}
}
provider "quicknode" {
// endpoint = "https://api.quicknode.com"
// Also set via QUICKNODE_APIKEY
// apikey = "todo"
}If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).
To compile the provider, run go install. This will build the provider and put the provider binary in the $GOPATH/bin directory.
To generate or update documentation or other generated code, run make generate.
In order to run the full suite of Acceptance tests, run make testacc, ensuring that the environment variable QUICKNODE_APIKEY is set with an apikey with at least the scope CONSOLE_REST.
Note: Acceptance tests create real resources, and often cost money to run.
QUICKNODE_APIKEY="qn_******" make testaccIn order to use a compiled provider for a local terraform plan/apply. Configure your ~.terraformrc as follows:
provider_installation {
dev_overrides {
"registry.terraform.io/hashicorp/quicknode" = "/path/to/go/bin"
}
}This made be done via the following command:
tee ~/.terraformrc <<EOT
provider_installation {
dev_overrides {
"registry.terraform.io/hashicorp/quicknode" = "$(echo `go env GOPATH`/bin)"
}
direct {}
}
EOT