Files
hunfabric/tests/modules/gke_cluster_autopilot/examples/basic.yaml
Jai Srivastav 41eaeb8ea0 Remove default values for access_config.ip_config for gke cluster modules (#3083)
* Change default values for authorized_ranges from {} to null and
gcp_public_cidrs_access_enabled from false to null in the
access_config.ip_access variable. This ensures the dynamic
master_authorized_networks_config block is properly
conditional on user input.

Previously, these fields would never be null due to their
default values, causing the block to always be initialized
even when users didn't intend to configure authorized networks.

* remove explicit null

* Remove all defaults for access_config.ip_access. Fix permadiff.

* Fix tests

* Swap try with coalesce

---------

Co-authored-by: Julio Castillo <jccb@google.com>
2025-05-28 20:07:36 +00:00

135 lines
3.8 KiB
YAML

# 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.
values:
module.cluster-1.google_container_cluster.cluster:
addons_config:
- cloudrun_config:
- disabled: true
load_balancer_type: null
config_connector_config:
- enabled: false
gke_backup_agent_config:
- enabled: false
horizontal_pod_autoscaling:
- disabled: false
http_load_balancing:
- disabled: false
kalm_config:
- enabled: false
allow_net_admin: false
binary_authorization: []
cluster_autoscaling:
- auto_provisioning_defaults:
- boot_disk_kms_key: null
disk_size: null
disk_type: null
image_type: null
min_cpu_platform: null
service_account: default
shielded_instance_config: []
autoscaling_profile: null
resource_limits: []
control_plane_endpoints_config:
- dns_endpoint_config:
- allow_external_traffic: true
ip_endpoints_config:
- enabled: true
cost_management_config:
- enabled: true
deletion_protection: true
description: null
disable_l4_lb_firewall_reconciliation: false
dns_config: []
effective_labels:
environment: dev
goog-terraform-provisioned: 'true'
enable_autopilot: true
enable_cilium_clusterwide_network_policy: false
enable_fqdn_network_policy: false
enable_intranode_visibility: true
enable_k8s_beta_apis: []
enable_kubernetes_alpha: false
enable_l4_ilb_subsetting: false
enable_legacy_abac: false
enable_multi_networking: false
enable_shielded_nodes: true
enable_tpu: false
fleet: []
initial_node_count: 1
ip_allocation_policy:
- additional_pod_ranges_config: []
cluster_secondary_range_name: pods
services_secondary_range_name: services
stack_type: IPV4
location: europe-west1
logging_config:
- enable_components:
- SYSTEM_COMPONENTS
- WORKLOADS
maintenance_policy:
- daily_maintenance_window:
- start_time: 03:00
maintenance_exclusion: []
recurring_window: []
master_auth:
- client_certificate_config:
- issue_client_certificate: false
master_authorized_networks_config:
- cidr_blocks:
- cidr_block: 10.0.0.0/8
display_name: internal-vms
min_master_version: null
monitoring_config:
- enable_components:
- SYSTEM_COMPONENTS
managed_prometheus:
- enabled: true
name: cluster-1
network: projects/xxx/global/networks/aaa
network_policy: []
networking_mode: VPC_NATIVE
node_pool_auto_config:
- linux_node_config: []
network_tags: []
node_kubelet_config:
- insecure_kubelet_readonly_port_enabled: 'TRUE'
resource_manager_tags: null
pod_security_policy_config: []
private_cluster_config:
- enable_private_endpoint: null
enable_private_nodes: true
private_endpoint_subnetwork: null
project: myproject
release_channel:
- channel: REGULAR
remove_default_node_pool: null
resource_labels:
environment: dev
resource_usage_export_config: []
secret_manager_config: []
subnetwork: subnet_self_link
terraform_labels:
environment: dev
goog-terraform-provisioned: 'true'
timeouts: null
user_managed_keys_config: []
counts:
google_container_cluster: 1
modules: 1
resources: 1
outputs: {}