agones.dev/agones@v1.53.0/build/terraform/e2e/gke-autopilot/module.tf (about) 1 // Copyright 2023 Google LLC All Rights Reserved. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 16 // Run: 17 // terraform apply -var project="<YOUR_GCP_ProjectID>" 18 19 terraform { 20 required_version = ">= 1.0.0" 21 required_providers { 22 google = { 23 source = "hashicorp/google" 24 version = "~> 4.25.0" 25 } 26 helm = { 27 source = "hashicorp/helm" 28 version = "~> 2.3" 29 } 30 } 31 } 32 33 variable "project" {} 34 variable "kubernetesVersion" {} 35 variable "location" {} 36 variable "releaseChannel" {} 37 38 module "gke_cluster" { 39 source = "../../../../install/terraform/modules/gke-autopilot" 40 41 cluster = { 42 "name" = format("gke-autopilot-e2e-test-cluster-%s", replace(var.kubernetesVersion, ".", "-")) 43 "project" = var.project 44 "location" = var.location 45 "releaseChannel" = var.releaseChannel 46 "kubernetesVersion" = var.kubernetesVersion 47 "deletionProtection" = false 48 "maintenanceExclusionStartTime" = timestamp() 49 "maintenanceExclusionEndTime" = timeadd(timestamp(), "2640h") # 110 days 50 } 51 52 udpFirewall = false // firewall is created at the project module level 53 }