# Source: https://langfuse.com/self-hosting/deployment/gcp.md

---
title: Deploy Langfuse on GCP with Terraform
description: Step-by-step guide to run Langfuse on GCP via Terraform.
label: "Version: v3"
sidebarTitle: "GCP (Terraform)"
---

# Deploy Langfuse on GCP with Terraform

This guide will walk you through the steps to deploy Langfuse on GCP using the official Terraform module ([langfuse/langfuse-terraform-gcp](https://github.com/langfuse/langfuse-terraform-gcp)).
You will need access to a GCP account and the Terraform CLI installed on your local machine.

By default, the Terraform module will provision the necessary infrastructure for the Langfuse application containers and data stores ([architecture overview](/self-hosting#architecture)).
You can optionally configure the module to use existing GCP resources. See the Readme for more details.

Alternatively, you can deploy Langfuse on Kubernetes using the [Helm chart](/self-hosting/deployment/kubernetes-helm).

<Callout type="info">
  If you are interested in contributing to our Terraform deployment guides or
  modules, please create an issue on the [GitHub
  Repository](https://github.com/langfuse/langfuse-terraform-gcp).
</Callout>

## Readme

Source: [langfuse/langfuse-terraform-gcp](https://github.com/langfuse/langfuse-terraform-gcp)

import { useData } from "nextra/hooks";
import { Playground } from "nextra/components";
import { Callout } from "nextra/components";

export const getStaticProps = async () => {
  const res = await fetch(
    "https://raw.githubusercontent.com/langfuse/langfuse-terraform-gcp/main/README.md" // Updated URL for GCP README
  );
  const readmeContent = await res.text();
  return {
    props: {
      ssg: {
        terraformReadme: readmeContent,
      },
    },
  };
};

export function TerraformReadme() {
  const { terraformReadme } = useData();
  // Basic check to prevent errors if fetching failed or content is empty
  if (!terraformReadme) {
    return <p>Error loading README content.</p>;
  }
  // Ensure the source prop receives a string
  const readmeString =
    typeof terraformReadme === "string"
      ? terraformReadme
      : JSON.stringify(terraformReadme);
  return <Playground source={readmeString} />;
}

<div className="p-6 mt-6 border bg-card rounded-md">
  <TerraformReadme />
</div>