Thank you for your interest in contributing to this Azure Infrastructure as Code library!
- Use the issue tracker to report bugs or request features
- Provide detailed information about the issue
- Include steps to reproduce for bugs
- Specify which IaC tool (Terraform/Bicep) is affected
-
Fork the Repository
git clone https://github.com/yourusername/testRepo01.git cd testRepo01 -
Create a Branch
git checkout -b feature/your-feature-name
-
Make Your Changes
- Follow the existing code structure
- Maintain consistency with current patterns
- Update documentation as needed
-
Test Your Changes
- Validate Terraform:
terraform validate - Validate Bicep:
az bicep build --file main.bicep - Test deployments in a development environment
- Validate Terraform:
-
Commit Your Changes
git add . git commit -m "Add feature: description of changes"
-
Push to Your Fork
git push origin feature/your-feature-name
-
Create Pull Request
- Provide clear description of changes
- Reference any related issues
- Include testing evidence if applicable
- Use consistent formatting:
terraform fmt - Include variable descriptions
- Add outputs for important values
- Use sensitive flag for secrets
- Follow naming conventions
Example:
variable "storage_account_name" {
description = "Name of the storage account (must be globally unique)"
type = string
validation {
condition = length(var.storage_account_name) >= 3 && length(var.storage_account_name) <= 24
error_message = "Storage account name must be between 3 and 24 characters."
}
}- Use clear parameter descriptions with
@description() - Leverage
@allowed()for restricted values - Add
@secure()for sensitive parameters - Use consistent indentation
- Follow naming conventions
Example:
@description('Name of the storage account')
@minLength(3)
@maxLength(24)
param storageAccountName string
@description('Storage account SKU')
@allowed([
'Standard_LRS'
'Standard_GRS'
])
param skuName string = 'Standard_LRS'- Update README files when adding new features
- Document all module parameters
- Provide usage examples
- Keep best practices documentation current
- Add inline comments for complex logic
-
Module Structure
modules/new-resource/ ├── main.tf (or main.bicep) ├── variables.tf ├── outputs.tf └── README.md -
Module Requirements
- Clear, descriptive naming
- Comprehensive variable validation
- Useful outputs
- Sensible defaults
- Documentation
-
Module Documentation Include in module README:
- Purpose and description
- Prerequisites
- Input parameters
- Outputs
- Usage examples
- Known limitations
- Maintain backward compatibility when possible
- Document breaking changes clearly
- Update version numbers appropriately
- Test with existing implementations
- Code follows style guidelines
- Terraform/Bicep validates successfully
- Documentation is updated
- Examples are provided
- Tested in development environment
- No hardcoded values or secrets
- Follows naming conventions
Terraform:
terraform fmt -check
terraform validate
terraform planBicep:
az bicep build --file main.bicep
az deployment group validate --template-file main.bicep- Automated checks run on pull requests
- Maintainers review code and documentation
- Address any feedback or requested changes
- Changes are merged once approved
- Open an issue for questions
- Check existing documentation
- Review example implementations
- Be respectful and inclusive
- Provide constructive feedback
- Help others learn and grow
- Follow community guidelines
By contributing, you agree that your contributions will be licensed under the same license as the project (MIT License).
Contributors will be recognized in the project documentation.
Thank you for contributing to making this Azure Infrastructure library better!