use terraform plugin cache

This commit is contained in:
miampf 2024-02-14 15:46:40 +01:00
parent 4430f448be
commit 05b4bed034
No known key found for this signature in database
GPG Key ID: EF039364B5B6886C

View File

@ -67,6 +67,11 @@ for directory in ./terraform-state-*; do
unzip -d "${directory}" -P "$artifact_pwd" "$directory/archive.zip" > /dev/null
done
# create terraform caching directory
mkdir "$HOME/tf_plugin_cache"
export TF_PLUGIN_CACHE_DIR="$HOME/tf_plugin_cache"
echo "[*] created terraform cache directory $TF_PLUGIN_CACHE_DIR"
echo "[*] deleting resources"
for directory in ./terraform-state-*; do
echo " deleting resources in $directory"