Skip to content

Conversation

rohanshah18
Copy link
Contributor

@rohanshah18 rohanshah18 commented Aug 18, 2025

Problem

This PR adds support for managing Pinecone projects through the Terraform provider. This feature enables users to create, read (describe), update, and delete projects programmatically using Terraform, including support for customer-managed encryption keys (CMEK) and custom pod limits.

Solution

Following changes were made:

  • Added admin client integration for calling the create, read (describe), update and delete project operations using the existing go-pinecone/v4 SDK
  • Added a new resource pinecone_project with full CRUD operations:
    • Project creation with custom names
    • CMEK encryption support (cannot be disabled once enabled)
    • Custom pod limits configuration
    • Project import functionality
  • Added docs for the following:
    • Resource documentation: docs/resources/project.md
    • Usage examples: examples/resources/pinecone_project/resource.tf
    • Updated main README with project management section
    • Updated examples README to include project resource

Example

The provider expects two environment variables PINECONE_CLIENT_ID and PINECONE_CLIENT_SECRET for admin authentication, while project configuration is passed as resource attributes.

provider "pinecone" {}

# Create a basic project
resource "pinecone_project" "example" {
  name = "my-production-project"
}

# Create a project with CMEK encryption enabled
resource "pinecone_project" "encrypted" {
  name                        = "secure-project"
  force_encryption_with_cmek  = true
}

# Create a project with custom pod limits
resource "pinecone_project" "custom_pods" {
  name     = "high-capacity-project"
  max_pods = 10
}

# Create a project with all options
resource "pinecone_project" "full_featured" {
  name                        = "comprehensive-project"
  force_encryption_with_cmek  = false
  max_pods                    = 5
}

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

Describe specific steps for validating this change.

  • Added unit tests for all CRUD operations
  • Added Integration tests
  • Verified by running CRUD operations for projects locally via test_local

@rohanshah18 rohanshah18 changed the title Add support for managing projects Add project management resource Aug 18, 2025
@rohanshah18 rohanshah18 changed the title Add project management resource Add support for managing projects Aug 18, 2025
@rohanshah18 rohanshah18 marked this pull request as ready for review August 21, 2025 19:54
Copy link
Contributor

@austin-denoble austin-denoble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM in terms of implementing a project resource. I was able to test end-to-end creating a project -> api-key -> index using a terraform configuration file, along with what we tested in the bug bash.

I left some comments around terraform data sources vs. resources. We may want to look at adding the code for supporting project and projects data sources, similar to what we have already for indexes and collections. That could either be done here or in a follow up - I don't feel confident with a lot of the terraform details at this point to know whether that's a blocker for releasing or not.

@rohanshah18 rohanshah18 merged commit 2d35459 into main Sep 4, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants