Standardize cloud bootstrap destroy process
- Added bootstrap destroy module structure for aws, ali, azure, gcp, and vultr. - Moved AWS force destroy script to `terraform-hcl-standard/aws-cloud/modules/bootstrap-destroy/destroy.sh`. - Updated `iac-pipeline-mutli-cloud-bootstrap..yaml` to dynamically invoke the destroy script based on the cloud provider. - Added placeholders for other cloud providers.
This commit is contained in:
parent
88328c17bd
commit
a2c2b95558
@ -84,7 +84,15 @@ jobs:
|
||||
- name: Force Destroy Bootstrap Resources
|
||||
if: env.DEPLOY_ACTION == 'destroy'
|
||||
run: |
|
||||
./scripts/aws-bootstrap-force-destroy.sh
|
||||
CLOUD_ROOT=$(dirname ${{ env.TG_ROOT }})
|
||||
DESTROY_SCRIPT="${CLOUD_ROOT}/modules/bootstrap-destroy/destroy.sh"
|
||||
if [ -f "$DESTROY_SCRIPT" ]; then
|
||||
chmod +x "$DESTROY_SCRIPT"
|
||||
"$DESTROY_SCRIPT"
|
||||
else
|
||||
echo "No destroy script found at $DESTROY_SCRIPT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Terragrunt Plan
|
||||
if: env.DEPLOY_ACTION == 'plan'
|
||||
|
||||
6
terraform-hcl-standard/ali-cloud/modules/bootstrap-destroy/destroy.sh
Executable file
6
terraform-hcl-standard/ali-cloud/modules/bootstrap-destroy/destroy.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# This script is a placeholder for Alibaba Cloud bootstrap resource cleanup
|
||||
echo "Not implemented yet for Ali Cloud"
|
||||
exit 0
|
||||
6
terraform-hcl-standard/azure-cloud/modules/bootstrap-destroy/destroy.sh
Executable file
6
terraform-hcl-standard/azure-cloud/modules/bootstrap-destroy/destroy.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# This script is a placeholder for Azure Cloud bootstrap resource cleanup
|
||||
echo "Not implemented yet for Azure Cloud"
|
||||
exit 0
|
||||
6
terraform-hcl-standard/gcp-cloud/modules/bootstrap-destroy/destroy.sh
Executable file
6
terraform-hcl-standard/gcp-cloud/modules/bootstrap-destroy/destroy.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# This script is a placeholder for GCP Cloud bootstrap resource cleanup
|
||||
echo "Not implemented yet for GCP Cloud"
|
||||
exit 0
|
||||
6
terraform-hcl-standard/vultr-vps/modules/bootstrap-destroy/destroy.sh
Executable file
6
terraform-hcl-standard/vultr-vps/modules/bootstrap-destroy/destroy.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# This script is a placeholder for Vultr VPS bootstrap resource cleanup
|
||||
echo "Not implemented yet for Vultr VPS"
|
||||
exit 0
|
||||
Loading…
Reference in New Issue
Block a user