#! /bin/bash

TG=terragrunt
if [[ "$1" == "local" ]]; then
	TG=terragrunt-local
fi

export TF_PLUGIN_CACHE_DIR=

rm -rf .terragrunt-cache
mv .terraform.lock.hcl .terraform.lock.hcl.bak
${TG} providers lock -platform=darwin_amd64 -platform=linux_amd64 -platform=windows_amd64 -platform=linux_arm64
