Skip to content

Instantly share code, notes, and snippets.

@javatarz
Last active December 13, 2019 08:40
Show Gist options
  • Save javatarz/d9314848516e919952fbfc7c681a5488 to your computer and use it in GitHub Desktop.
Save javatarz/d9314848516e919952fbfc7c681a5488 to your computer and use it in GitHub Desktop.
Part of the functions.sh file
#!/bin/bash
function fetch_variables() {
workspace_name=$1
module_name=$2
echo $(cat ../config/$workspace_name/$module_name.tfvars | sed '/^$/D' | sed 's/.*/TF_VAR_& /' | tr -d '\n')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment