From de2a5e9ed18919c9cd14ba6260003f28d7a735ac Mon Sep 17 00:00:00 2001 From: Andrew Peabody Date: Mon, 11 Apr 2022 11:32:19 -0700 Subject: [PATCH] docs: Expand independent ASM submodule example req (#1213) --- modules/asm/README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/asm/README.md b/modules/asm/README.md index ad29660eec..b5cf69fae5 100644 --- a/modules/asm/README.md +++ b/modules/asm/README.md @@ -4,11 +4,22 @@ This module installs [Anthos Service Mesh](https://cloud.google.com/service-mesh ## Usage -There are a few prerequisites to using this module that can be done either through Terraform or manually: +There are a few prerequisites to using this module that can be done either through Terraform and/or manually: 1. Enable the `mesh.googleapis.com` service 1. Enable the `servicemesh` feature on the cluster hub 1. Register target cluster to the servicemesh-enabled hub +1. Configure the [Kubernetes Provider](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs) for the target cluster, for example: + +```tf +provider "kubernetes" { + host = "https://${module.gke.endpoint}" + token = data.google_client_config.default.access_token + cluster_ca_certificate = base64decode(module.gke.ca_certificate) +} + +data "google_client_config" "default" {} +``` There is a full example provided [here](../../examples/simple_zonal_with_asm). Detailed usage example is as follows: