You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: samples/compliance-testing/README.md
+2-20Lines changed: 2 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,7 @@
1
-
---
2
-
title: Terraform Compliance Testing
3
-
description: This article shows how to apply BDD-style compliance testing to terraform
4
-
ms.topic: tutorial
5
-
ms.date: 06/15/2020
6
-
---
7
-
8
1
# Tutorial: Terraform Compliance Testing
9
2
10
3
Compliance testing, also known as Conformance testing, is a nonfunctional testing technique which is done to validate whether the system developed meets the organization’s prescribed standards or not. Most software teams do an analysis to check that the standards are properly enforced and implemented. Often working simultaneously to improve the standards, which will, in turn, lead to better quality.
11
4
12
-
## Prerequisites
13
-
14
-
-**Terraform:**[install and run](configure-vs-code-extension-for-terraform.md) your first Terraform command from your machine.
15
-
-**Docker:**[install](https://docs.docker.com/get-docker/) the docker command on your machine.
16
-
-**terraform-compliance:**[install](https://terraform-compliance.com/pages/installation/docker) the terraform-compliance tool on your machine.
17
-
-**Fork testing samples:** to get started quickly, we recommend that you fork [this repository](https://github.com/Azure/terraform) into your own GitHub organization.
18
-
19
5
## When to use Compliance Testing
20
6
21
7
Compliance testing is performed to ensure the compliance of the deliverables of each phase of the development lifecycle. If you you have to enforce sufficient tests to validate the degree of compliance to the methodology and identify the violators.
@@ -125,7 +111,7 @@ docker run --rm -v $PWD:/target -it eerkunt/terraform-compliance -f features -p
125
111
126
112
This should result in a failing test run. We see our first rule of requiring existence of tags suceed but we don't comply with the full spec of tags: `Role` and `Creator` tags are missing:
Make the test green again by adding all required tags to `main.tf`:
131
117
@@ -148,9 +134,5 @@ terraform plan -out tf.out
148
134
149
135
Now, we should be green when running the tests suite again. We see our first rule of requiring existence of tags suceed and now we also provide the full spec of tags too:
0 commit comments