diff --git a/gke/standard/regional/hpa-logs/main.tf b/gke/standard/regional/hpa-logs/main.tf new file mode 100644 index 000000000..09b4f13e9 --- /dev/null +++ b/gke/standard/regional/hpa-logs/main.tf @@ -0,0 +1,31 @@ +/** +* Copyright 2025 Google LLC +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +# [START gke_standard_regional_hpa_logs] +resource "google_container_cluster" "default" { + name = "gke-standard-hpa-logs" + location = "us-central1" + initial_node_count = 1 + + logging_config { + enable_components = ["SYSTEM_COMPONENTS", "KCP_HPA"] + } + + # Set `deletion_protection` to `true` will ensure that one cannot + # accidentally delete this instance by use of Terraform. + deletion_protection = false +} +# [END gke_standard_regional_hpa_logs]