Skip to main content

Contributing

Learn how to contribute to Pulumi Any Terraform
4 min read

Thank you for your interest in contributing to Pulumi Any Terraform! This guide will help you get started with development, testing, and submitting contributions.

Development Setup#

Prerequisites#

  • Node.js 22.18.0 or later
  • pnpm 10.14.0 or later
  • Git for version control
  • A GitHub account

Setting Up Your Environment#

  1. Fork and clone the repository:
  1. Install dependencies:
  1. Verify your setup:

Project Structure#

Adding a New Provider#

1. Create Package Directory#

2. Create package.json#

3. Generate Parameterization Value#

The parameterization.value field must be a base64-encoded JSON:

4. Create README.md#

Create comprehensive documentation for your provider (see existing providers for examples).

5. Add TypeScript Configuration#

Create tsconfig.json:

6. Test Your Provider#

Development Workflow#

Making Changes#

  1. Create a feature branch:
  1. Make your changes following the coding standards

  2. Format your code:

  1. Check for issues:
  1. Build affected packages:

Running Quality Checks#

Coding Standards#

TypeScript Best Practices#

  • Use import type for type-only imports
  • Avoid using any - prefer proper typing
  • Use const for variables that are never reassigned
  • Prefer arrow functions for consistency
  • Use template literals over string concatenation

File Organization#

  • Keep generated files in bin/ directory
  • Store type definitions in types/ directory
  • Place documentation in provider README.md

Naming Conventions#

  • Use kebab-case for file names: my-component.ts
  • Use PascalCase for classes: MyResource
  • Use camelCase for variables and functions: myVariable

Testing#

Manual Testing#

Test your provider with a real Pulumi program:

Run the test:

Integration Testing#

Test with actual provider APIs:

  1. Set up required credentials
  2. Deploy test resources
  3. Verify resource creation
  4. Clean up resources

Documentation#

Provider Documentation#

Each provider needs comprehensive documentation:

  1. Installation instructions
  2. Configuration guide
  3. Quick start examples
  4. Common use cases
  5. Resource reference
  6. Troubleshooting guide

Documentation Site#

Add provider documentation to the docs site:

Add the page to the Providers group in docs/docs.json.

Submitting Changes#

Creating a Pull Request#

  1. Push your branch:
  1. Open a Pull Request on GitHub

  2. Fill out the PR template with:

    • Description of changes
    • Related issue number
    • Testing performed
    • Breaking changes (if any)

PR Review Process#

  1. Automated checks run (linting, building, testing)
  2. Maintainers review your code
  3. Address any feedback
  4. Once approved, your PR will be merged

After Merge#

  • Your changes are automatically deployed
  • Packages are published to npm
  • Documentation is updated

Release Process#

Version Management#

We use Changesets for version management:

  1. Create a changeset:
  1. Select packages to version

  2. Choose version bump (patch, minor, major)

  3. Describe changes

  4. Commit the changeset:

Publishing#

Publishing happens automatically when:

  1. PR is merged to main
  2. Changesets exist
  3. GitHub Actions runs the publish workflow
  4. Packages are published to npm

Getting Help#

Resources#

  • GitHub Issues: Report bugs and request features
  • Pull Requests: Browse existing contributions
  • Documentation: Read the full documentation site
  • Pulumi Slack: Join the community discussions

Common Questions#

Q: How do I find the right Terraform provider version? A: Check the Terraform Registry for the latest version.

Q: My build is failing. What should I do? A: Run pnpm nx reset to clear caches, then try again.

Q: How do I test provider changes locally? A: Use pnpm link to link your local package to a test Pulumi program.

Q: Can I add support for a private Terraform provider? A: Yes, but you'll need to host it in a private registry and update the parameterization URL.

Code of Conduct#

We follow a Code of Conduct to ensure a welcoming environment:

  • Be respectful and inclusive
  • Provide constructive feedback
  • Focus on what is best for the community
  • Show empathy towards other community members

License#

By contributing, you agree that your contributions will be licensed under the MIT License.

Thank You!#

Your contributions make this project better for everyone. We appreciate your time and effort!