Skip to content

Latest commit

 

History

History
62 lines (45 loc) · 2.64 KB

CONTRIBUTING.md

File metadata and controls

62 lines (45 loc) · 2.64 KB

Provider Developers

Prerequisites

Prerequisites for this repository are already satisfied by the Pulumi Devcontainer if you are using Github Codespaces, or VSCode.

If you are not using VSCode, you will need to ensure the following tools are installed and present in your $PATH:

Build & test the boilerplate XYZ provider

Open in GitHub Codespaces

  1. Open repo in GitHub Codespaces.
  2. Open a terminal in the CodeSpaces IDE.
  3. Run make build install to build and install the provider.
  4. Export your Pinecone API Token: export PINECONE_API_KEY="0000b000-86cf-4ecf-a753-00000000000"
  5. Run make up to run the example program in examples/yaml.
  6. Run make down to tear down the example program.

This will:

  1. Create the SDK codegen binary and place it in a ./bin folder (gitignored)
  2. Create the provider binary and place it in the ./bin folder (gitignored)
  3. Generate the dotnet, Go, Node, and Python SDKs and place them in the ./sdk folder
  4. Install the provider locally.
  5. Run the example program in examples/yaml using the locally built provider.
  6. Tear down the example program.

Test against the example

$ cd examples/ts
$ yarn link @pinecone-database/pinecone
$ yarn install
$ pulumi stack init test
$ pulumi up

A brief repository overview

You now have:

  1. A provider/ folder containing the building and implementation logic
    1. cmd/pulumi-resource-pinecone/main.go - holds the provider's sample implementation logic.
  2. deployment-templates - a set of files to help you around deployment and publication
  3. sdk - holds the generated code libraries created by pulumi-gen-xyz/main.go
  4. examples a folder of Pulumi programs to try locally and/or use in CI.
  5. A Makefile and this README.

Additional Details

This repository depends on the pulumi-go-provider library. For more details on building providers, please check the Pulumi Go Provider docs.