aboutsummaryrefslogtreecommitdiff
path: root/test/terraform
diff options
context:
space:
mode:
authorPierre-Emmanuel Mercier <acesyde@gmail.com>2022-12-13 21:58:22 +0300
committerGitHub <noreply@github.com>2022-12-13 21:58:22 +0300
commit84f3e62d1c5ea8a62152606e7aec81ef711eae0a (patch)
tree9c4fda03ba904cd0380ff364bb01b71264821bfc /test/terraform
parent7b009e661f13085629b19fc157b577916587f6bc (diff)
Add TFSec and Terraform Docs to Terraform features (#327)
* Add TFSec and Terraform Docs * PR Review * code review
Diffstat (limited to 'test/terraform')
-rw-r--r--test/terraform/install_terraform_docs.sh15
-rw-r--r--test/terraform/install_tfsec.sh15
-rw-r--r--test/terraform/scenarios.json18
3 files changed, 48 insertions, 0 deletions
diff --git a/test/terraform/install_terraform_docs.sh b/test/terraform/install_terraform_docs.sh
new file mode 100644
index 0000000..4ca0b16
--- /dev/null
+++ b/test/terraform/install_terraform_docs.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+set -e
+
+# Import test library for `check` command
+source dev-container-features-test-lib
+
+# Check to make sure the user is vscode
+check "user is vscode" whoami | grep vscode
+
+# Terraform Docs specific tests
+check "tfsec" terraform-docs --version
+
+# Report result
+reportResults \ No newline at end of file
diff --git a/test/terraform/install_tfsec.sh b/test/terraform/install_tfsec.sh
new file mode 100644
index 0000000..0c9a48b
--- /dev/null
+++ b/test/terraform/install_tfsec.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+set -e
+
+# Import test library for `check` command
+source dev-container-features-test-lib
+
+# Check to make sure the user is vscode
+check "user is vscode" whoami | grep vscode
+
+# TFSec specific tests
+check "tfsec" tfsec --version
+
+# Report result
+reportResults \ No newline at end of file
diff --git a/test/terraform/scenarios.json b/test/terraform/scenarios.json
new file mode 100644
index 0000000..2365643
--- /dev/null
+++ b/test/terraform/scenarios.json
@@ -0,0 +1,18 @@
+{
+ "install_tfsec": {
+ "image": "mcr.microsoft.com/devcontainers/base:jammy",
+ "features": {
+ "terraform": {
+ "installTFsec": true
+ }
+ }
+ },
+ "install_terraform_docs": {
+ "image": "mcr.microsoft.com/devcontainers/base:jammy",
+ "features": {
+ "terraform": {
+ "installTerraformDocs": true
+ }
+ }
+ }
+} \ No newline at end of file