{"id":39258830,"url":"https://github.com/langfuse/langfuse-terraform-gcp","last_synced_at":"2026-01-18T00:24:33.004Z","repository":{"id":295773685,"uuid":"967443774","full_name":"langfuse/langfuse-terraform-gcp","owner":"langfuse","description":"🪢 Terraform module to deploy Langfuse on GCP","archived":false,"fork":false,"pushed_at":"2025-12-12T12:58:49.000Z","size":55,"stargazers_count":25,"open_issues_count":4,"forks_count":13,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-12-14T03:32:26.117Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/langfuse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-16T13:14:24.000Z","updated_at":"2025-12-12T12:58:53.000Z","dependencies_parsed_at":"2025-05-27T10:30:36.176Z","dependency_job_id":"2134bebb-dc6b-4218-a5ce-c2e2584f67bf","html_url":"https://github.com/langfuse/langfuse-terraform-gcp","commit_stats":null,"previous_names":["langfuse/langfuse-terraform-gcp"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/langfuse/langfuse-terraform-gcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langfuse%2Flangfuse-terraform-gcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langfuse%2Flangfuse-terraform-gcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langfuse%2Flangfuse-terraform-gcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langfuse%2Flangfuse-terraform-gcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/langfuse","download_url":"https://codeload.github.com/langfuse/langfuse-terraform-gcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langfuse%2Flangfuse-terraform-gcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28523715,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T23:53:28.710Z","status":"ssl_error","status_checked_at":"2026-01-17T23:52:20.131Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-18T00:24:32.943Z","updated_at":"2026-01-18T00:24:32.993Z","avatar_url":"https://github.com/langfuse.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"![GitHub Banner](https://github.com/langfuse/langfuse-k8s/assets/2834609/2982b65d-d0bc-4954-82ff-af8da3a4fac8)\n\n# GCP Langfuse Terraform module\n\n\u003e This module is a pre-release version and its interface may change. \n\u003e Please review the changelog between each release and create a GitHub issue for any problems or feature requests.\n\nThis repository contains a Terraform module for deploying [Langfuse](https://langfuse.com/) - the open-source LLM observability platform - on GCP.\nThis module aims to provide a production-ready, secure, and scalable deployment using managed services whenever possible.\n\n![gcp-architecture](https://github.com/user-attachments/assets/a8fb739f-1757-451e-9808-e77ebfa2d334)\n\n\n## Usage\n\n1. Enable required APIs on your Google Cloud Account:\n- Certificate Manager API\n- Cloud DNS API\n- Compute Engine API\n- Container File System API\n- Google Cloud Memorystore for Redis API\n- Kubernetes Engine API\n- Network Connectivity API\n- Service Networking API\n\n2. Set up the module with the settings that suit your need. A minimal installation requires a `domain` which is under your control only.\n\n```hcl\nmodule \"langfuse\" {\n  source = \"github.com/langfuse/langfuse-terraform-gcp?ref=0.3.3\"\n\n  domain = \"langfuse.example.com\"\n\n  # Optional use a different name for your installation\n  # e.g. when using the module multiple times on the same GCP project\n  name   = \"langfuse\"\n\n  # Optional: Configure the VPC\n  subnetwork_cidr = \"10.0.0.0/16\"\n\n  # Optional: Configure the Langfuse Helm chart version\n  langfuse_chart_version = \"1.5.14\"\n}\n\nprovider \"kubernetes\" {\n  host                   = module.langfuse.cluster_host\n  cluster_ca_certificate = module.langfuse.cluster_ca_certificate\n  token                  = module.langfuse.cluster_token\n}\n\nprovider \"helm\" {\n  kubernetes {\n    host                   = module.langfuse.cluster_host\n    cluster_ca_certificate = module.langfuse.cluster_ca_certificate\n    token                  = module.langfuse.cluster_token\n  }\n}\n```\n\n2. Apply the DNS zone and the GKE Cluster. This avoids an error around missing dependencies on the [kubernetes_manifest](https://github.com/hashicorp/terraform-provider-kubernetes/issues/1775).\n\n```bash\nterraform init\nterraform apply --target module.langfuse.google_dns_managed_zone.this --target module.langfuse.google_container_cluster.this\n```\n\n3. Set up the Nameserver delegation on your DNS provider. You can find the nameservers using the following command. Replace `langfuse` with your zone name, e.g. `langfuse-example-com`.\n\n```bash\n$ gcloud dns managed-zones describe langfuse --format=\"get(nameServers)\"\n```\n\n4. Apply the full stack\n\n```bash\nterraform apply\n```\n\n5. Start using Langfuse by navigating to `https://\u003cdomain\u003e` in your browser.\n\n### Known issues\n\n1. Getting an `ERR_SSL_VERSION_OR_CIPHER_MISMATCH` error after installation on the HTTPS endpoint.\n\nSince Google Cloud takes a while (~20 Minutes) to provision new certificates, an invalid TLS certificate is presented for a while after initial installation of this module. Please use `gcloud compute ssl-certificates list` to check the current provisioning status. If it is still in `PROVISIONING` state this issue is expected. E.g.\n\n```bash\n$ gcloud compute ssl-certificates list\nNAME      TYPE     CREATION_TIMESTAMP             EXPIRE_TIME  REGION  MANAGED_STATUS\nlangfuse  MANAGED  2025-04-06T03:41:54.791-07:00                       PROVISIONING\n    \u003chostname\u003e: PROVISIONING\n```\n\nWhen the certificate becomes active the ingress controller should pick it up and present a valid TLS certificate:\n\n```bash\n$ gcloud compute ssl-certificates list\nNAME      TYPE     CREATION_TIMESTAMP             EXPIRE_TIME                    REGION  MANAGED_STATUS\nlangfuse  MANAGED  2025-04-06T03:41:54.791-07:00  2025-07-05T03:41:56.000-07:00          ACTIVE\n    \u003chostname\u003e: ACTIVE\n```\n\n## Features\n\nThis module creates a complete Langfuse stack with the following components:\n\n- VPC with public and private subnets\n- GKE cluster with node pools\n- Cloud SQL PostgreSQL instance\n- Cloud Memorystore Redis instance\n- Cloud Storage bucket for storage\n- TLS certificates and Cloud DNS configuration\n- Required IAM roles and firewall rules\n- GKE Ingress Controller for ingress\n- Filestore CSI Driver for persistent storage\n\n## Additional Environment Variables\n\nThe module supports injecting custom environment variables into the Langfuse container through the `additional_env` parameter. This feature supports both direct values and Kubernetes `valueFrom` references.\n\n```hcl\nmodule \"langfuse\" {\n  source = \"github.com/langfuse/langfuse-terraform-gcp\"\n\n  domain = \"langfuse.example.com\"\n\n  additional_env = [\n    # Direct value\n    {\n      name  = \"LOG_LEVEL\"\n      value = \"debug\"\n    },\n\n    # Secret reference\n    {\n      name = \"API_KEY\"\n      valueFrom = {\n        secretKeyRef = {\n          name = \"my-secrets\"\n          key  = \"api-key\"\n        }\n      }\n    },\n\n    # ConfigMap reference\n    {\n      name = \"CONFIG_FILE\"\n      valueFrom = {\n        configMapKeyRef = {\n          name = \"app-config\"\n          key  = \"config.json\"\n        }\n      }\n    }\n  ]\n}\n```\n\n## Requirements\n\n| Name        | Version |\n|-------------|---------|\n| terraform   | \u003e= 1.0  |\n| google      | \u003e= 5.0  |\n| google-beta | \u003e= 5.0  |\n| kubernetes  | \u003e= 2.10 |\n| helm        | \u003e= 2.5  |\n\n## Providers\n\n| Name        | Version |\n|-------------|---------|\n| google      | \u003e= 5.0  |\n| google-beta | \u003e= 5.0  |\n| kubernetes  | \u003e= 2.10 |\n| helm        | \u003e= 2.5  |\n| random      | \u003e= 3.0  |\n| tls         | \u003e= 3.0  |\n\n## Resources\n\n| Name                                        | Type     |\n|---------------------------------------------|----------|\n| google_container_cluster.langfuse           | resource |\n| google_container_node_pool.default          | resource |\n| google_sql_database_instance.postgres       | resource |\n| google_sql_database.langfuse                | resource |\n| google_sql_user.langfuse                    | resource |\n| google_redis_instance.redis                 | resource |\n| google_storage_bucket.langfuse              | resource |\n| google_compute_managed_ssl_certificate.cert | resource |\n| google_dns_managed_zone.zone                | resource |\n| google_dns_record_set.langfuse              | resource |\n| google_service_account.gke                  | resource |\n| google_project_iam_member.gke               | resource |\n| google_compute_firewall.gke                 | resource |\n| google_compute_firewall.postgres            | resource |\n| google_compute_firewall.redis               | resource |\n| google_compute_network.vpc                  | resource |\n| google_compute_subnetwork.subnet            | resource |\n| google_kms_key_ring.langfuse                | resource |\n| google_kms_crypto_key.langfuse              | resource |\n| kubernetes_namespace.langfuse               | resource |\n| kubernetes_secret.langfuse                  | resource |\n| helm_release.ingress_nginx                  | resource |\n| helm_release.cert_manager                   | resource |\n| random_password.database                    | resource |\n| tls_private_key.langfuse                    | resource |\n\n## Inputs\n\n| Name                                | Description                                                                                                                                                                                               | Type         | Default                 | Required |\n|-------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|-------------------------|:--------:|\n| name                                | Name to use for or prefix resources with                                                                                                                                                                  | string       | \"langfuse\"              |    no    |\n| domain                              | Domain name used to host langfuse on (e.g., langfuse.company.com)                                                                                                                                         | string       | n/a                     |   yes    |\n| use_encryption_key                  | Wheter or not to use an Encryption key for LLM API credential and integration credential store                                                                                                            | bool         | true                    |    no    |\n| kubernetes_namespace                | Namespace to deploy langfuse to                                                                                                                                                                           | string       | \"langfuse\"              |    no    |\n| subnetwork_cidr                     | CIDR block for Subnetwork                                                                                                                                                                                 | string       | \"10.0.0.0/16\"           |    no    |\n| database_instance_tier              | The machine type to use for the database instance                                                                                                                                                         | string       | \"db-perf-optimized-N-2\" |    no    |\n| database_instance_edition           | The edition to use for the database instance                                                                                                                                                              | string       | \"ENTERPRISE_PLUS\"       |    no    |\n| database_instance_availability_type | The availability type to use for the database instance                                                                                                                                                    | string       | \"REGIONAL\"              |    no    |\n| cache_tier                          | The service tier of the instance                                                                                                                                                                          | string       | \"STANDARD_HA\"           |    no    |\n| cache_memory_size_gb                | Redis memory size in GB                                                                                                                                                                                   | number       | 1                       |    no    |\n| deletion_protection                 | Whether or not to enable deletion_protection on data sensitive resources                                                                                                                                  | bool         | true                    |    no    |\n| langfuse_chart_version              | Version of the Langfuse Helm chart to deploy                                                                                                                                                              | string       | \"1.5.14\"                |    no    |\n| additional_env                      | Additional environment variables to add to the Langfuse container. Supports both direct values and Kubernetes valueFrom references (secrets, configMaps). See examples/additional-env for usage examples. | list(object) | []                      |    no    |\n\n## Outputs\n\n| Name                   | Description                      |\n|------------------------|----------------------------------|\n| cluster_name           | GKE Cluster Name                 |\n| cluster_host           | GKE Cluster endpoint             |\n| cluster_ca_certificate | GKE Cluster CA certificate       |\n| cluster_token          | GKE Cluster authentication token |\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. Here are some ways you can contribute:\n- Add support for new cloud providers\n- Improve existing configurations\n- Add monitoring and alerting templates\n- Improve documentation\n- Report issues\n\n## Support\n\n- [Langfuse Documentation](https://langfuse.com/docs)\n- [Langfuse GitHub](https://github.com/langfuse/langfuse)\n- [Join Langfuse Discord](https://langfuse.com/discord)\n\n## License\n\nMIT Licensed. See LICENSE for full details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flangfuse%2Flangfuse-terraform-gcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flangfuse%2Flangfuse-terraform-gcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flangfuse%2Flangfuse-terraform-gcp/lists"}