Skip to main content

Uninstalling & Cleanup

!warning

Complete data backups and retain configuration copies before proceeding with deletion steps.

Step 1 - Remove Connections in Yuki Dashboard

In the Yuki dashboard, navigate to Connections and delete the connections. This action automatically removes all resources Yuki had provisioned.


Snowflake

Step 2 - Delete DNS Records

Remove the Route 53 DNS records pointing to the Yuki Proxy.

Step 3 - Destroy AWS Infrastructure (Terraform)

Destroy the DNS/proxy infrastructure first:

terraform destroy

Then destroy the EKS cluster and VPC:

terraform destroy -target=module.eks
terraform destroy -target=module.vpc

Step 4 - Clean Up Snowflake

Remove Yuki users and roles:

REVOKE ROLE yuki_application_role FROM USER yuki_application;
DROP USER IF EXISTS yuki_application;
DROP ROLE IF EXISTS yuki_application_role;

Revoke grants and privileges:

REVOKE ALL PRIVILEGES ON ALL WAREHOUSES FROM ROLE yuki_application_role;
REVOKE ALL PRIVILEGES ON ALL DATABASES FROM ROLE yuki_application_role;

Step 5 - Revert Connection Strings

Update connection strings in all your tools (dbt, Looker, Tableau, etc.) to point directly back to Snowflake rather than through the Yuki Proxy hostname.


BigQuery

Step 2 - Disable Optimization for All Projects

In the Yuki dashboard, toggle optimization OFF for every project. This stops query routing through the Yuki Proxy immediately.

Step 3 - Revert Connection Strings

Remove the BIGQUERY_EMULATOR_HOST environment variable or api_endpoint extended attribute from all connected tools so queries route directly to BigQuery again.

Step 4 - Delete the Yuki Service Account

Remove the yuki-sa service account and its organization-level IAM bindings:

# Revoke organization-level roles
gcloud organizations remove-iam-policy-binding <ORGANIZATION_ID> \
--member="serviceAccount:yuki-sa@<PROJECT_NAME>.iam.gserviceaccount.com" \
--role=roles/bigquery.metadataViewer

gcloud organizations remove-iam-policy-binding <ORGANIZATION_ID> \
--member="serviceAccount:yuki-sa@<PROJECT_NAME>.iam.gserviceaccount.com" \
--role=roles/bigquery.jobUser

gcloud organizations remove-iam-policy-binding <ORGANIZATION_ID> \
--member="serviceAccount:yuki-sa@<PROJECT_NAME>.iam.gserviceaccount.com" \
--role=roles/resourcemanager.organizationViewer

gcloud organizations remove-iam-policy-binding <ORGANIZATION_ID> \
--member="serviceAccount:yuki-sa@<PROJECT_NAME>.iam.gserviceaccount.com" \
--role=roles/iam.serviceAccountViewer

gcloud organizations remove-iam-policy-binding <ORGANIZATION_ID> \
--member="serviceAccount:yuki-sa@<PROJECT_NAME>.iam.gserviceaccount.com" \
--role=roles/resourcemanager.projectCreator

gcloud organizations remove-iam-policy-binding <ORGANIZATION_ID> \
--member="serviceAccount:yuki-sa@<PROJECT_NAME>.iam.gserviceaccount.com" \
--role=roles/bigquery.resourceEditor

# Delete the service account
gcloud iam service-accounts delete \
yuki-sa@<PROJECT_NAME>.iam.gserviceaccount.com \
--project=<PROJECT_NAME>

Step 5 - Delete the Yuki-Managed Project and Reservation

Delete the dedicated BigQuery project and reservation Yuki created during onboarding:

gcloud projects delete <YUKI_PROJECT_ID>
info

Deleting the project also removes the BigQuery reservation, slot commitments, and any APIs that were enabled within it.