mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-04-20 23:36:29 -04:00
update state with remote state and dont error on failed downloads (eg if artifact doesnt exist)
This commit is contained in:
parent
04fc6e6221
commit
782a096e6b
@ -8,13 +8,14 @@ function get_e2e_test_ids_on_date {
|
||||
|
||||
# download_tfstate_artifact downloads all artifacts matching the pattern terraform-state-* from a given workflow ID.
|
||||
function download_tfstate_artifact {
|
||||
gh run download "$1" -p "terraform-state-*" -R edgelesssys/constellation > /dev/null || exit 1
|
||||
gh run download "$1" -p "terraform-state-*" -R edgelesssys/constellation > /dev/null
|
||||
}
|
||||
|
||||
# delete_resources runs terraform destroy on the constellation-terraform subfolder of a given folder.
|
||||
function delete_resources {
|
||||
cd "$1/constellation-terraform" || exit 1
|
||||
terraform init > /dev/null || exit 1 # first, install plugins
|
||||
terraform state pull > terraform.tfstate || exit 1 # update the local state with the remote state to only have resources over that have to be cleaned up.
|
||||
terraform destroy -auto-approve > /dev/null || exit 1
|
||||
cd ../../ || exit 1
|
||||
}
|
||||
@ -23,6 +24,7 @@ function delete_resources {
|
||||
function delete_iam_config {
|
||||
cd "$1/constellation-iam-terraform" || exit 1
|
||||
terraform init > /dev/null || exit 1 # first, install plugins
|
||||
terraform state pull > terraform.tfstate || exit 1 # update the local state with the remote state to only have resources over that have to be cleaned up.
|
||||
terraform destroy -auto-approve > /dev/null || exit 1
|
||||
cd ../../ || exit 1
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user