We aim to make getting started with Regula trivial, whether it's on your laptop or in CI/CD.
On the Getting Started page you can see we have binaries for all major platforms and a Docker image.
Run Regula with the -h
option to get loads of tips.
If you have docker, you can really just run one command:
docker run --rm -t \
-v $(pwd):/workspace \
--workdir /workspace \
fugue/regula:v1.0.0 run
Here's an example of using curl
to download the latest Regula release from Github.
install_regula:
steps:
- run:
name: Install Regula
command: |
archive="regula_1.0.0_Linux_x86_64.tar.gz"
asset_url="https://github.com/fugue/regula/releases/download/v1.0.0/${archive}"
curl -sLJO -H 'Accept:application/octet-stream' "${asset_url}"
tar -xvzf ${archive}
chmod +x regula
sudo mv regula /usr/local/bin/regula
Regula has built-in capabilities to help unit test Terraform and CloudFormation templates, including code generation.
Check out:
regula test -h
regula write-test-inputs -h
Also you can peruse our documentation on testing rules in our documentation.