Commit b269b5bd authored by Yun Guo's avatar Yun Guo

Merge branch 'ops-postgres-backup-bucket' into 'master'

create postgres bakup bucket in ops

See merge request !692
parents dfd37fe1 277b4921
......@@ -14,7 +14,7 @@ variable "gitlab_net_zone_id" {}
## Google
provider "google" {
version = "~> 1.16.0"
version = "~> 1.18.0"
project = "${var.project}"
region = "${var.region}"
}
......@@ -794,3 +794,18 @@ module "gke-runner" {
project = "${var.project}"
region = "${var.region}"
}
##################################
#
# GCS Bucket for postgres backup
#
##################################
module "postgres-backup" {
environment = "${var.environment}"
gcs_postgres_backup_service_account = "${var.gcs_postgres_backup_service_account}"
restore_service_account = "${var.gcs_postgres_restore_service_account}"
kms_key_id = "${var.gcs_postgres_backup_kms_key_id}"
source = "../../modules/gitlab-database-backup"
retention_days = "${var.postgres_backup_retention_days}"
}
......@@ -213,3 +213,26 @@ variable "gcs_service_account_email" {
type = "string"
default = "[email protected]"
}
# Service account used to do automated backup testing
# in https://gitlab.com/gitlab-restore/postgres-gprd
variable "gcs_postgres_backup_service_account" {
type = "string"
default = "[email protected]"
}
variable "gcs_postgres_restore_service_account" {
type = "string"
default = "[email protected]t.com"
}
variable "gcs_postgres_backup_kms_key_id" {
type = "string"
default = "projects/gitlab-ops/locations/global/keyRings/gitlab-secrets/cryptoKeys/ops-postgres-wal-archive"
}
variable "postgres_backup_retention_days" {
type = "string"
default = "5"
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment