This Terraform configuration creates a scalable, reliable, and observable GitLab instance on Google Kubernetes Engine (GKE) as the computing environment and the following services for storing data:
- CloudSQL for PostgreSQL
- Memorystore for Redis
- Cloud Storage
module "gitlab" {
source = "../modules/gke_gitlab"
project_id = var.project_id
certmanager_email = var.certmanager_email
}
Then perform the following commands on the root folder:
terraform init
to get the pluginsterraform plan
to see the infrastructure planterraform apply
to apply the infrastructure build
Name | Description | Type | Default | Required |
---|---|---|---|---|
certmanager_email | Email used to retrieve SSL certificates from Let's Encrypt | string | n/a | yes |
gitlab_db_password | Password for the GitLab Postgres user | string | "" |
no |
project_id | GCP Project to deploy resources | string | n/a | yes |
region | GCP region to deploy resources to | string | "us-central1" |
no |
Name | Description |
---|---|
gitlab_url | URL where you can access your GitLab instance |
root_password_instructions | Instructions for getting the root user's password for initial setup |
- Terraform 0.12.x
- terraform-provider-google plugin v1.8.0
In order to execute this module you must have a Service Account with the following project roles:
- roles/owner
Be sure you have the correct Terraform version (0.12.x), you can choose the binary here:
The project has the following folders and files:
- /deployment: Terraform deployment execution
- main.tf: main file for this module, contains all the resources to create
- variables.tf: all the variables for the module
- output.tf: the outputs of the module
- providers.tf: project providers (gcp, kubernetes, helm)
- versions.tf: required versions
- /values.yaml.tpl: Helm values. Learn more about values in helm