Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 107 additions & 0 deletions modules/gke-standard-cluster/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -974,44 +974,151 @@ spec:
outputs:
- name: addons_config
description: The configuration for addons supported by GKE Autopilot.
type:
- object
- cloudrun_config:
- list
- - object
- disabled: bool
load_balancer_type: string
config_connector_config:
- list
- - object
- enabled: bool
dns_cache_config:
- list
- - object
- enabled: bool
gce_persistent_disk_csi_driver_config:
- list
- - object
- enabled: bool
gcp_filestore_csi_driver_config:
- list
- - object
- enabled: bool
gcs_fuse_csi_driver_config:
- list
- - object
- enabled: bool
gke_backup_agent_config:
- list
- - object
- enabled: bool
horizontal_pod_autoscaling:
- list
- - object
- disabled: bool
http_load_balancing:
- list
- - object
- disabled: bool
istio_config:
- list
- - object
- auth: string
disabled: bool
kalm_config:
- list
- - object
- enabled: bool
lustre_csi_driver_config:
- list
- - object
- enable_legacy_lustre_port: bool
enabled: bool
network_policy_config:
- list
- - object
- disabled: bool
parallelstore_csi_driver_config:
- list
- - object
- enabled: bool
ray_operator_config:
- list
- - object
- enabled: bool
ray_cluster_logging_config:
- list
- - object
- enabled: bool
ray_cluster_monitoring_config:
- list
- - object
- enabled: bool
stateful_ha_config:
- list
- - object
- enabled: bool
Comment on lines +977 to +1053
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The type definition for addons_config has two significant issues:

  1. Incorrect Type: The Terraform output for addons_config is a list containing a single object (list(object)), but the type is defined here as a direct object. To match the actual output schema, it should be defined as a list of objects.

  2. Invalid YAML Structure: The properties of the object (e.g., cloudrun_config, config_connector_config) are not structured as a valid YAML mapping. The use of a hyphen - on the first property (cloudrun_config) combined with the indentation of subsequent properties creates an invalid structure. All properties should be keys within a single mapping that defines the object.

These issues make the type definition both inaccurate and syntactically incorrect.

- name: ca_certificate
description: Cluster ca certificate (base64 encoded)
type: string
- name: cluster_id
description: Cluster ID
type: string
- name: cluster_name
description: Cluster name
type: string
- name: endpoint
description: Cluster endpoint
type: string
- name: endpoint_dns
description: Cluster endpoint DNS
type: string
- name: horizontal_pod_autoscaling_enabled
description: Whether horizontal pod autoscaling enabled
type: bool
- name: http_load_balancing_enabled
description: Whether http load balancing enabled
type: bool
- name: identity_service_enabled
description: Whether Identity Service is enabled
type: bool
- name: intranode_visibility_enabled
description: Whether intra-node visibility is enabled
type: bool
- name: location
description: Cluster location (region if regional cluster, zone if zonal cluster)
type: string
- name: logging_service
description: Logging service used
type: string
- name: master_authorized_networks_config
description: Networks from which access to master is permitted
type:
- list
- - object
- cidr_blocks:
- list
- - object
- cidr_block: string
display_name: string
gcp_public_cidrs_access_enabled: bool
private_endpoint_enforcement_enabled: bool
Comment on lines +1089 to +1098
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The type definition for master_authorized_networks_config has two critical issues:

  1. Invalid YAML Syntax: The indentation for gcp_public_cidrs_access_enabled and private_endpoint_enforcement_enabled is incorrect. They are indented as if they are part of the cidr_blocks value, but cidr_blocks is a list and cannot contain these keys. This results in invalid YAML. All properties of the object should be sibling keys in the same mapping.

  2. Incorrect Field: The field private_endpoint_enforcement_enabled is not a valid property of the master_authorized_networks_config object. It belongs to private_cluster_config and should be removed from this type definition.

I've provided a suggestion to fix both the syntax and the incorrect field.

        type:
          - list
          - - object
            - 
              cidr_blocks:
                - list
                - - object
                  - cidr_block: string
                    display_name: string
              gcp_public_cidrs_access_enabled: bool

- name: master_version
description: Current master kubernetes version
type: string
- name: min_master_version
description: Minimum master kubernetes version
type: string
- name: monitoring_service
description: Monitoring service used
type: string
- name: network_policy_enabled
description: Whether network policy enabled
type: bool
- name: node_locations
description: The list of zones in which the cluster's nodes are located.
type:
- list
- string
- name: secret_manager_addon_enabled
description: Whether Secret Manager add-on is enabled
type: bool
- name: vertical_pod_autoscaling_enabled
description: Whether vertical pod autoscaling enabled
type: bool
requirements:
roles:
- level: Project
Expand Down