2022-01-25 17:22:30 +08:00
|
|
|
terraform {
|
|
|
|
required_providers {
|
|
|
|
google = {
|
|
|
|
source = "hashicorp/google"
|
2022-02-02 01:14:11 +08:00
|
|
|
version = "~> 4.0"
|
2022-01-25 17:22:30 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-25 01:16:26 +08:00
|
|
|
provider "google" {
|
|
|
|
credentials = file(var.keyfile_location)
|
|
|
|
region = var.region
|
|
|
|
project = var.gcp_project_id
|
|
|
|
}
|
|
|
|
|
|
|
|
module "kubernetes" {
|
|
|
|
source = "./modules/kubernetes-cluster"
|
|
|
|
region = var.region
|
|
|
|
prefix = var.prefix
|
|
|
|
|
|
|
|
machines = var.machines
|
|
|
|
ssh_pub_key = var.ssh_pub_key
|
|
|
|
|
2022-01-31 16:30:24 +08:00
|
|
|
master_sa_email = var.master_sa_email
|
|
|
|
master_sa_scopes = var.master_sa_scopes
|
|
|
|
master_preemptible = var.master_preemptible
|
2022-02-15 16:22:02 +08:00
|
|
|
master_additional_disk_type = var.master_additional_disk_type
|
2022-01-31 16:30:24 +08:00
|
|
|
worker_sa_email = var.worker_sa_email
|
|
|
|
worker_sa_scopes = var.worker_sa_scopes
|
|
|
|
worker_preemptible = var.worker_preemptible
|
2022-02-15 16:22:02 +08:00
|
|
|
worker_additional_disk_type = var.worker_additional_disk_type
|
2020-12-25 01:16:26 +08:00
|
|
|
|
|
|
|
ssh_whitelist = var.ssh_whitelist
|
|
|
|
api_server_whitelist = var.api_server_whitelist
|
|
|
|
nodeport_whitelist = var.nodeport_whitelist
|
2022-03-03 08:52:46 +08:00
|
|
|
ingress_whitelist = var.ingress_whitelist
|
2023-01-17 15:46:32 +08:00
|
|
|
|
|
|
|
extra_ingress_firewalls = var.extra_ingress_firewalls
|
2020-12-25 01:16:26 +08:00
|
|
|
}
|