From 443a9b9538804d4f564cfdafa040a125c6276251 Mon Sep 17 00:00:00 2001 From: Antonio Lopez <94461129+ajlopezn@users.noreply.github.com> Date: Fri, 3 Jun 2022 13:02:42 +0200 Subject: [PATCH] Create CLEANUP.md instructions to clean up FAST deployment --- fast/CLEANUP.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 fast/CLEANUP.md diff --git a/fast/CLEANUP.md b/fast/CLEANUP.md new file mode 100644 index 00000000..952339bf --- /dev/null +++ b/fast/CLEANUP.md @@ -0,0 +1,38 @@ +# FAST deployment clean up +In case you require destroying FAST deployment in your organization, follow these steps. + +Destruction goes in reverse order, from stage 3 to stage 0: + +## Stage 3 (Project Factory) + +```bash +cd $FAST_PWD/03-project-factory/prod/ +terraform destroy +``` + +## Stage 3 (GKE) + +```bash +cd $FAST_PWD/03-project-factory/prod/ + +for x in $(terraform state list | grep google_bigquery_dataset); do + terraform state rm "$x"; +done + +terraform destroy +``` + + +# Stage 2 (Security) +```bash +cd $FAST_PWD/02-security/ +terraform destroy +``` + +# Networking +```bash +cd $FAST_PWD/02-networking-XXX/ +terraform destroy +```bash + +There's a minor glitch that can surface running terraform destroy, where the service project attachments to the Shared VPC will not get destroyed even with the relevant API call succeeding. We are investigating the issue, in the meantime just manually remove the attachment in the Cloud console or via the gcloud beta compute shared-vpc associated-projects remove command when terraform destroy fails, and then relaunch the command.