Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions examples/complete-gitlab-setup/backend.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
terraform {
backend "s3" {
bucket = "gitlab-tf"
key = "gitlab/terraform.tfstate"
region = "ap-south-1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
gitlab_rails['omniauth_providers'] = [
{
name: "google_oauth2",
app_id: "google_oauth_app_id",
app_secret: "google_oauth_app_secret",
args: { access_type: "offline", approval_prompt: "" }
}
]
40 changes: 40 additions & 0 deletions examples/complete-gitlab-setup/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
module "gitlab" {
source = "../../"

create_gitlab_domain = true
gitlab_domain = "gitlab"
gitlab_fqdn = "gitlab.example.com"
hosted_zone = "example.com"
private_subnet_id = "subnet-u8dy389d78qhh338"
public_subnet_ids = [
"subnet-h89dj8d3j2jd8", "subnet-jd8jq3dj89qj9jd3", "subnet-jd89jh89dj9dj9j9qw"
]
volume_size = 30
volume_type = "gp3"
vpc_id = "vpc-89rh423789hr982h98"
create_acm_certificate = true
healthcheck_matcher = "200"
healthcheck_path = "/-/readiness"
gitlab_ssh_public_key = "ssh publickey"
gitlab_pg_allocated_storage = 100
gitlab_pg_db_instance_class = "db.m5.large"
gitlab_pg_db_name = "gitlabhq_production"
gitlab_pg_engine_version = "12.11"
gitlab_pg_password = "foobarbaz"
gitlab_pg_publicly_accessible = false
gitlab_pg_storage_type = "gp3"
gitlab_pg_subnet_ids = ["subnet-u8dy389d78qhh338", "subnet-hde38hd89qhdwhw"]
gitlab_pg_username = "gitlab"
gitlab_redis_engine_version = "7.0"
gitlab_redis_node_type = "cache.t3.medium"
gitlab_redis_create_parameter_group = true
gitlab_redis_parameter_group = {
name = "gitlab-redis"
family = "redis7"
}
gitlab_redis_subnet_ids = ["subnet-u8dy389d78qhh338", "subnet-hde38hd89qhdwhw"]
enable_gitlab_backup_to_s3 = true
gitlab_backup_bucket_name = "example-gitlab-backup"
private_key = var.private_key
create_ses_identity = true
}
13 changes: 13 additions & 0 deletions examples/complete-gitlab-setup/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
output "gitlab_pg_address" {
value = module.gitlab.gitlab_pg_address
description = "Gitlab Postgres address"
}

output "gitlab_redis_address" {
value = module.gitlab.gitlab_redis_address
description = "Gitlab Redis address"
}

output "gitlab_url" {
value = module.gitlab.gitlab_complete_url
}
4 changes: 4 additions & 0 deletions examples/complete-gitlab-setup/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
variable "private_key" {
type = string
description = "Private key to execute ansible playbook on Gitlab instance."
}
14 changes: 14 additions & 0 deletions examples/complete-gitlab-setup/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
terraform {
required_version = ">= 1.3"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.40"
}
null = {
source = "hashicorp/null"
version = ">= 3.2.1"
}
}
}