Complete prerequisites#
Before you start contributing rules to PSRule for Azure, there are some required tools and recommended learning resources to help you get started.
Required tooling#
Using GitHub Codespaces#
If you have access to GitHub Codespaces, you can use it to contribute to PSRule for Azure. This allows you to work in a pre-configured environment without needing to set up your local machine. Otherwise you can follow the instructions below to set up your local development environment.
Set up your local development environment#
PSRule for Azure requires the following dependencies for development:
- .NET SDK 8.0 — is used for building the project and core features.
- PowerShell — is used for building the project, running the rules tests, and development of some rules.
- Az PowerShell module — is used for exporting Azure resources and policies (in-flight).
To install development dependencies, refer to the installation guide.
Fork and clone the repository#
To start contributing, the first step is to fork the repository to your GitHub account and then clone it to your local machine.
- Fork the repository — Fork.
- Clone your fork — Once the repository is forked, clone it to your local machine.
Recommended learning#
Understand the Project Structure#
Before you start contributing, it's helpful to understand the organization of the repository. Some of the most common sub-directories that are worth knowing about include:
- docs/ — All documentation lives written in markdown.
- en/rules/ — Markdown files for each rule.
- CHANGELOG-v1.md — Change log.
- samples/ — Community samples.
- src/PSRule.Rules.Azure/ — Module source code.
- rules/ — Rule source code.
- tests/PSRule.Rules.Azure.Tests/ — Tests for rules and modules features.
Intro to Git and GitHub#
When contributing you'll need to have a GitHub account and a basic understanding of Git. Check out the links below to get started.
- Make sure you have a GitHub account.
-
GitHub Help: