I have 2 k8s clusters both in GKE, both provisioned via terraform but one of them is on autopilot mode.
But I can't find any resource online of how to enable anthos service mesh in them via terraform.
When I click any of the clusters details page I see:
Both clusters are already registered to my Anthos fleet, example:
resource "google_gke_hub_membership" "anthos_registration" {
provider = google-beta
project = var.project_id
membership_id = google_container_cluster.cluster.name
endpoint {
gke_cluster {
resource_link = "//container.googleapis.com/${google_container_cluster.foobar.id}"
}
}
}
got a simple example of a gke cluster working with anthos service mesh via terraform posting it here in case someone needs it in the future: