Skip to content

Shayan-Ghani/terraform-policy-with-docker

Repository files navigation

Docker Terraform policy

Copyright © 2022 Shayan Ghani shayanghani1384@gmail.com

Applying Terraform policies to some docker containers.

How to use

prerequirements :

  • Terraform
  • Python
  • Venv

Step1 : Clone the repository and open the directory.

$ git clone https://github.com/Shayan-Ghani/terraform-policy-with-docker.git
$ cd terraform-policy-with-docker

Step2 : Initialize terraform provider

$ terraform init

Step3 : Generate a suitable plan output for Tf2

$ terraform plan -out="./terrform.tfplan"

Step4: Create venv and Install the requirements.txt

$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -U pip
$ pip install -r ./requirements.txt

Last step : Run the test script

$ python3 pac_tests.py

Find out more about Tf2 project .

About

Applying policy-as-code to a set terraform configurations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published