Skip to content

FrancisRalph/actual-budget-gcp-cloud-run

Repository files navigation

Actual Budget for Google Cloud (Cloud Run)

This is a Terraform configuration for deploying the Actual Budget server to a Cloud Run service in GCP, which should stay under the always free tier with normal usage (as long as you are not syncing with the server for ~2 hours per day).

Free tier limits for the services used:

  • Cloud Run
    • 2 million requests per month
    • 360,000 GB-seconds of memory, 180,000 vCPU-seconds of compute time
    • 1 GB of outbound data transfer from North America per month
      • This only applies if you access the site directly through the Cloud Run service URL. If you use the Firebase Hosting URL, connections are routed to North America before reaching the Cloud Run service, so this limit is not reached.
  • Cloud Storage
    • 5 GB-months of regional storage (US regions only) per month
  • Firebase Hosting
    • 360 MB/day ($0.15/GB thereafter)
      • IMPORTANT: Exporting data from Actual Budget will count towards this limit. If you have over 10 years of transactions, consider downloading the budget files directly from the Cloud Storage bucket instead.

References:

Prerequisites

  1. Terraform CLI
  2. Google Cloud CLI
  3. HCP Terraform account with a workspace created (ensure the "Execution Mode" is set to "Local".)

Instructions

  1. In provider.tf, set the organization and workspace to your HCP organization and workspace.
  2. Create a new project in Google Cloud Console.
  3. Create a new Firebase project in the Firebase Console.
  4. Find your project ID and billing account ID.
  5. Create a tfvars.auto.tfvars file in the root of the project with the following variables:
    project_id = "your-project-id"
    billing_account_id = "your-billing-account-id"
    currency_code = "your-currency-code"
    project_name = "your-project-name"
    The project_name can be anything you want.
  6. Run gcloud auth application-default login to authenticate with Google Cloud.
  7. Run terraform init to initialize the project.
  8. Run terraform apply to deploy the project.
  9. Once the deployment is complete, you should see "firebase_hosting_url = ..." in the output. That is the URL you should use to access the Actual Budget site.

Redeploying the Cloud Run Service

If you wish to update the version of Actual Budget that the Cloud Run service is running:

  1. Run terraform apply -replace="module.cloud_run.google_cloud_run_v2_service.main"
  2. Then, run terraform apply to update other resources.

Changelogs

2024-11-05

  • Added support for Firebase Hosting.
  • Renamed cloud_run_service_name to project_name, please update your tfvars.auto.tfvars file.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages