Update CLEANUP.md

This commit is contained in:
Antonio Lopez
2022-06-03 13:38:05 +02:00
committed by GitHub
parent 2ace596ca8
commit 02f8986a1e

View File

@@ -11,10 +11,12 @@ terraform destroy
```
## Stage 3 (GKE)
Terraform refuses to delete empty GCS buckets and/or BigQuery datasets, so they need to be removed manually from tf state
```bash
cd $FAST_PWD/03-project-factory/prod/
# remove BQ dataset manually
for x in $(terraform state list | grep google_bigquery_dataset); do
terraform state rm "$x";
done
@@ -66,7 +68,7 @@ rm 00-bootstrap-providers.tf
# migrate to local state
terraform init -migrate-state
# remove buckets and BQ dataset manually
# remove GCS buckets and BQ dataset manually
for x in $(terraform state list | grep google_storage_bucket.bucket); do
terraform state rm "$x";
done