makefiles

non-makefiles as wrapper scripts
git clone git://git.pyratebeard.net/makefiles.git
Log | Files | Refs | README

terraform (503B)


      1 NAME := test
      2 VARS := terraform
      3 
      4 .PHONY init plan planapply refresh destroy clean
      5 
      6 init:
      7 ·   terraform init
      8 
      9 plan: init
     10 ·   terraform plan -var-file=${VARS}.tfvars -out ${NAME}.tfplan
     11 
     12 apply:
     13 ·   terraform apply -auto-approve -state-out=${NAME}.tfstate ${NAME}.tfplan
     14 
     15 planapply: init plan apply
     16 
     17 refresh:
     18 ·   terraform refresh -state=${NAME}.tfstate
     19 
     20 destroy: refresh
     21 ·   terraform destroy -var-file=${VARS}.tfvars -state=${NAME}.tfstate
     22 
     23 clean: destroy
     24 ·   rm -f ${NAME}.tf{plan,state{,.backup}}