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#
- Fork and clone the repository:
- Install dependencies:
- 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#
- Create a feature branch:
-
Make your changes following the coding standards
-
Format your code:
- Check for issues:
- Build affected packages:
Running Quality Checks#
Coding Standards#
TypeScript Best Practices#
- Use
import typefor type-only imports - Avoid using
any- prefer proper typing - Use
constfor 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:
- Set up required credentials
- Deploy test resources
- Verify resource creation
- Clean up resources
Documentation#
Provider Documentation#
Each provider needs comprehensive documentation:
- Installation instructions
- Configuration guide
- Quick start examples
- Common use cases
- Resource reference
- 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#
- Push your branch:
-
Open a Pull Request on GitHub
-
Fill out the PR template with:
- Description of changes
- Related issue number
- Testing performed
- Breaking changes (if any)
PR Review Process#
- Automated checks run (linting, building, testing)
- Maintainers review your code
- Address any feedback
- 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:
- Create a changeset:
-
Select packages to version
-
Choose version bump (patch, minor, major)
-
Describe changes
-
Commit the changeset:
Publishing#
Publishing happens automatically when:
- PR is merged to main
- Changesets exist
- GitHub Actions runs the publish workflow
- 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!