Hello GCP channel ... I am getting a strange error...
# google-cloud
p
Hello GCP channel ... I am getting a strange error deploying an autopilot cluster and I'm unsure what I'm doing wrong.
Copy code
python inline source runtime error: 'Cluster' object is not callable
From this code:
Copy code
def create_gks_autopilot_cluster(project_id, name, region, network_id, subnet_id):

    gke_min_version = "1.25.6-gke.200"
    default = gcp.serviceaccount.Account("default",
                                         account_id="service-account-id",
                                         display_name="Service Account")

    # Define the GKE Autopilot cluster
    gke_cluster = gcp.container.Cluster(name,
                                        enable_autopilot=True,
                                        ip_allocation_policy=container.ClusterIpAllocationPolicyArgs(
                                            cluster_secondary_range_name="pods",
                                            services_secondary_range_name="services",
                                        ),
                                        location=region,
                                        min_master_version=gke_min_version,
                                        network=network_id,
                                        release_channel={"channel": "STABLE"},
                                        subnetwork=subnet_id,
                                        project=project_id,)
    return gke_cluster
Is there anything obvious I should be doing differently? .. this is running in a Jupyter notebook .. which has made configs unavailable (probably due being unable to find the .yaml file) but otherwise seems to work.
Was a user error in specifying the program fn .. I forgot to make it a lambda. That error message was kind of terrible though .. and people think Clojure's are bad lol.