Skip to content

Commit

Permalink
Merge pull request #256 from terrateamio/main
Browse files Browse the repository at this point in the history
Release v1
  • Loading branch information
orbitz authored Apr 19, 2024
2 parents 9e7a97f + 90d93c5 commit d2e2828
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 6 additions & 2 deletions conftest-wrapper
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env bash
set -euf -o pipefail

terraform show -json ${TERRATEAM_PLAN_FILE} > ${TERRATEAM_PLAN_FILE}.json
conftest test --ignore .git ${TERRATEAM_PLAN_FILE}.json .
if [[ "$TERRATEAM_ENGINE_NAME" == "cdktf" ]]; then
cd cdktf.out/stacks/"$TERRATEAM_WORKSPACE"
fi

terraform show -json "${TERRATEAM_PLAN_FILE}" > "${TERRATEAM_PLAN_FILE}.json"
conftest test --ignore .git "${TERRATEAM_PLAN_FILE}.json" .
3 changes: 3 additions & 0 deletions terrat_runner/work_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,13 @@ def _read(fname):


def set_tf_version_env(env, repo_config, engine, repo_root, working_dir):
ENGINE_NAME = 'TERRATEAM_ENGINE_NAME'
TF_CMD_ENV_NAME = 'TERRATEAM_TF_CMD'
TOFU_ENV_NAME = 'TOFUENV_TOFU_DEFAULT_VERSION'
TERRAFORM_ENV_NAME = 'TERRATEAM_TERRAFORM_VERSION'

env[ENGINE_NAME] = engine['name']

if engine['name'] == 'tofu':
env[TF_CMD_ENV_NAME] = 'tofu'
version = engine.get('version')
Expand Down

0 comments on commit d2e2828

Please sign in to comment.