Skip to main content

existing_cluster_network_hosts

Function existing_cluster_network_hosts 

Source
pub fn existing_cluster_network_hosts(
    entry: &ResourceEntry,
    cloud_platform: Platform,
) -> bool
Expand description

Whether setup can put this resource’s private endpoint on the network of an existing Kubernetes cluster, so that the cluster’s workloads reach it.

Only a GCP Postgres can: the module looks the cluster’s own network up. A Memorystore instance cannot move to another network after creation, and on AWS and Azure the module keeps a network of its own that the cluster is not attached to. Any other resource is never refused, so the answer for it is true. That includes an extension type that requires the network: it uses whichever network the module keeps, whether or not the cluster reaches it.

The network preflight (at build time) and the generated modules (at plan time, where the cluster mode is chosen) both ask this, so they refuse the same cases.