Please note we have a code of conduct. Please follow it in all your interactions with the project.
Ways to Contribute
There are many ways to contribute to the project:Report Bugs
File issues for bugs, errors, or unexpected behavior
Request Features
Suggest new resources, data sources, or improvements
Improve Documentation
Fix typos, add examples, or clarify existing docs
Contribute Code
Implement new resources, fix bugs, or improve performance
Write Tests
Add unit tests, acceptance tests, or improve test coverage
Answer Questions
Help other users in GitHub issues or Discord
Getting Started
Prerequisites
Before you start contributing, ensure you have:- Go 1.21+ installed
- Terraform 1.5+ installed
- Git for version control
- A Microsoft 365 tenant with appropriate permissions for testing
- Familiarity with Terraform and Go programming
Setting Up Your Development Environment
Fork the Repository
Fork the terraform-provider-microsoft365 repository to your GitHub account.
Contributing Code
Development Workflow
Create a Feature Branch
feature/- New features or resourcesfix/- Bug fixesdocs/- Documentation changestest/- Test improvements
Make Your Changes
Follow the Development Guide for implementing new resources or features.Key principles:
- Follow existing code patterns and structure
- Write clear, self-documenting code
- Add appropriate comments for complex logic
- Include error handling and validation
Write Tests
All code contributions must include tests:
- Unit tests for helper functions and logic
- Acceptance tests for resource CRUD operations
Update Documentation
If adding new resources:
- Create example
.tffiles inexamples/resources/ - Add Terraform Registry template in
templates/resources/ - Update relevant documentation files
Commit Your Changes
Write clear, descriptive commit messages:Commit message format:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changestest:- Test changesrefactor:- Code refactoringchore:- Maintenance tasks
Pull Request Guidelines
When creating a pull request:PR Checklist
PR Checklist
- Code follows existing style and patterns
- All tests pass locally
- New tests added for new functionality
- Documentation updated (if applicable)
- Examples provided for new resources
- Commit messages follow conventional format
- PR description clearly explains changes
- No breaking changes (or clearly documented)
- Linters pass without errors
Code Review Process
Code Review Process
- Automated Checks: CI/CD pipelines run tests and linters
- Maintainer Review: Project maintainers review code quality and design
- Feedback Iteration: Address feedback and make requested changes
- Approval: Once approved, maintainers merge the PR
- Release: Changes included in next provider release
Reporting Issues
If you find a bug or want to suggest an enhancement:Bug Reports
Search Existing Issues
Check if the issue already exists in GitHub Issues
Use Bug Report Template
Create a new issue using the bug report template and provide:
- Clear, descriptive title
- Provider version
- Terraform version
- Operating system
- Resource name (if applicable)
- Steps to reproduce
- Expected behavior
- Actual behavior
- Error messages and logs
- Terraform configuration (sanitized)
Feature Requests
Check Roadmap
Review the Provider Roadmap to see if the feature is already planned
Create Feature Request
Use the feature request template and include:
- Clear description of the feature
- Use case and business justification
- Microsoft Graph API resource/endpoint
- Priority (critical/high/medium/low)
- Examples of desired Terraform configuration
- Dependencies or related features
Code Style and Standards
Go Code Style
- Follow Effective Go guidelines
- Use
gofmtfor code formatting - Follow existing patterns in the codebase
- Write idiomatic Go code
- Use meaningful variable and function names
- Keep functions focused and concise
Terraform Configuration Style
- Use consistent indentation (2 spaces)
- Follow Terraform style conventions
- Provide meaningful resource names and descriptions
- Include comments for complex configurations
Documentation Style
- Use clear, concise language
- Provide practical examples
- Link to relevant Microsoft documentation
- Include API permissions required
- Document known limitations
- Keep examples up-to-date
Testing Requirements
Unit Tests
Required for:- Helper functions
- Data transformation logic
- Validation functions
- State mapping functions
Acceptance Tests
Required for:- All new resources
- All resource CRUD operations
- Resource import functionality
Community Guidelines
Code of Conduct
We are committed to providing a welcoming and inclusive environment. All contributors must:- Be respectful and considerate
- Accept constructive criticism gracefully
- Focus on what is best for the community
- Show empathy towards other community members
- Avoid harassment, discrimination, or inappropriate behavior
Getting Help
If you need help:Discord Community
Join our Discord for real-time discussions and help
GitHub Discussions
Ask questions and discuss ideas
GitHub Issues
Report bugs and request features
Development Guide
Read the comprehensive development guide
License
By contributing to this project, you agree that your contributions will be licensed under the same license as the project (see LICENSE file).Recognition
Contributors will be:- Listed in release notes for their contributions
- Recognized in the project README
- Part of a growing community of M365 automation enthusiasts
Related Resources
- Development Guide - Detailed development workflows
- Provider Roadmap - Planned features
- Known Issues - Current bugs and limitations
- GitHub Repository - Source code
