Skip to content

Commit

Permalink
fix: revert "Pass through arguments to terraform sub commands (#186)" (
Browse files Browse the repository at this point in the history
…#242)

This reverts commit 1783e60.
  • Loading branch information
marcind authored Mar 18, 2022
1 parent c956bc7 commit 3d10177
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions terraform-actions/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,28 @@ export TF_IN_AUTOMATION=true
workingDir="$2"
function main {
command="$1"
firstWord=$(echo ${command} | cut -d' ' -f1)
remainingArgs=$(echo ${command} | cut -d' ' -f2-)

scriptDir=$(dirname ${0})
source ${scriptDir}/apply.sh
source ${scriptDir}/fmt.sh
source ${scriptDir}/init.sh
source ${scriptDir}/plan.sh
source ${scriptDir}/validate.sh

case "${firstWord}" in
case "${command}" in
apply)
terraformApply ${remainingArgs}
terraformApply
;;
fmt)
terraformFmt ${remainingArgs}
terraformFmt
;;
init)
terraformInit ${remainingArgs}
terraformInit
;;
plan)
terraformPlan ${remainingArgs}
terraformPlan
;;
validate)
terraformValidate ${remainingArgs}
terraformValidate
;;
*)
echo "Error: Unrecognized command ${command}"
Expand Down

1 comment on commit 3d10177

@purajit
Copy link

@purajit purajit commented on 3d10177 Jun 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the reason for this revert?

Please sign in to comment.