chore(enos): Add debug variable (#3037)

This commit is contained in:
Michael Li authored and GitHub committed 2023-03-02 12:37:12 -05:00
1 parent ab0a2ad689
commit 54aad4d292
9 files changed
+35 -6

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
DIR=$(pwd)
SCRIPTS_DIR=$( cd -- "$( dirname -- "$0" )" &> /dev/null && pwd )
STATEDIR=$(ls -td $SCRIPTS_DIR/../.enos/*/ | head -1) # get latest directory
cd $STATEDIR
terraform show -json terraform.tfstate | jq -r '.values.root_module.child_modules[].resources[] | select(.address=="module.run_e2e_test.enos_local_exec.run_e2e_test") | .values.environment | to_entries[] | "export \(.key)=\(.value|@sh)"'
cd $DIR