Terraform
Terraform is an infrastructure as code tool that lets you create, update, and version infrastructure by defining resources in configuration files. This allows for a repeated workflow for provisioning and managing your infrastructure.
Setup guide
This page shows you how to use the Terraform Provider for Pinecone to manage Pinecone indexes and collections.
Requirements
Ensure you have the following:
- Terraform >= v1.4.6
- Go >= v1.23.7
- A Pinecone API key
Installation
The provider is registered in the official Terraform registry.
This enables the provider to be auto-installed when you run terraform init
. You can also download the latest binary for your target platform from the Releases tab.
Enable the provider
To enable the provider in your Terraform configuration, set a PINECONE_API_KEY
environment variable to your Pinecone API key and add the following to your Terraform configuration file:
If your API key was set as an input variable, you can use that value in the declaration, for example:
Resources
The Pinecone Terraform Provider currently supports index and collection resources.
Indexes
The pinecone_index
resource lets you create, delete, and update indexes.
Collections
The pinecone_collection
resource lets you create, delete, and update collections for pod-based indexes.
Limitations
The Terraform Provider for Pinecone does not currently support the following resources:
Additional resources
- Documentation can be found on the Terraform Registry.
- See the GitHub respository for additional usage examples.
- For support requests, create an issue in the GitHub repository.