Skip to content

RonasIT/terraform-google-gke-factory

Repository files navigation

Terraform GCP cloud factory

Setup

terraform init
gcloud auth application-default login
terraform state pull

Required roles in GCP

  • Editor

Get GKE service account key

terraform output ci_private_key

Update doc

terraform-docs -c .tfdocs-config.yml .

Module documentation

Requirements

Name Version
google 4.52.0
google-beta 4.52.0
helm 2.7.1
kubernetes 2.15.0

Providers

Name Version
google 4.52.0

Modules

Name Source Version
gke ./modules/gke-factory n/a

Resources

Name Type
google_compute_address.ingress_ip_address resource
google_project_default_service_accounts.deprivilege_default_service_account resource
google_project_iam_binding.compute_account_storage_iam resource
google_project_iam_binding.storage_service_account_storage_iam resource
google_project_iam_member.ci_service_account_editor_iam resource
google_project_iam_member.ci_service_account_token_creator_iam resource
google_service_account.ci_service_account resource
google_service_account.storage_service_account resource
google_service_account_key.ci_service_account_key resource
google_service_account_key.storage_service_account_key resource
google_storage_bucket.artifacts_bucket resource
google_project.project data source

Inputs

Name Description Type Default Required
cluster_issuer_email The email of the cluster issuer (works only if install_nginx_ingress_and_cert_manager set as true) string n/a yes
project_id The ID of the project string n/a yes
project_name The name of the project string n/a yes
cert_manager_additional_solvers Additional solvers for cert-manager (works only if install_nginx_ingress_and_cert_manager set as true) list(any) [] no
cluster_issuer_server The server of the cluster issuer (works only if install_nginx_ingress_and_cert_manager set as true) string "https://acme-v02.api.letsencrypt.org/directory" no
cluster_region The region of the cluster string "us-central1" no
cluster_release_channel Cluster release channel (UNSPECIFIED, RAPID, REGULAR and STABLE). Defaults to UNSPECIFIED. string "UNSPECIFIED" no
cluster_zones The zones of the cluster list(string)
[
"us-central1-a"
]
no
environment_name The name of the environment string "cloud" no
install_nginx_ingress_and_cert_manager Install nginx ingress and cert manager bool true no
is_prometheus_metrics_enabled Enable Prometheus metrics bool false no
logging_service The logging service string "none" no
monitoring_service The monitoring service string "none" no
nginx_controller_additional_set Additional set for nginx-controller (works only if install_nginx_ingress_and_cert_manager set as true) list(any) [] no
node_pool_autoupgrade Autoupgrade for node pools bool true no
node_pool_disk_size Disk size for node pools number 30 no
node_pool_disk_type Disk type for node pools string "pd-balanced" no
node_pool_machine_type Machine type for node pools string "n1-standard-1" no
node_pool_nodes_max_count Maximum number of nodes in node pools number 3 no
node_pool_preemptible Preemptible for node pools bool false no

Outputs

Name Description
artifacts_bucket_url The URL of the artifacts bucket
cluster_name The name of the cluster
cluster_network Network of the cluster
cluster_region The region of the cluster
cluster_zones The zones of the cluster
ingress_ip_address The IP address of the ingress
project_id The ID of the project
project_name The name of the project
service_account_ci_email The email of the CI service account
service_account_ci_private_key The private key of the CI service account
service_account_storage_email The email of the storage service account
service_account_storage_private_key The private key of the storage service account