Skip to content

Commit 4b7eeb3

Browse files
authored
chore: update ACM docs (#1261)
* chore: update ACM docs * add client config
1 parent 81686e7 commit 4b7eeb3

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

modules/acm/README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,41 @@ Other clusters should disable feature activation by setting `enable_fleet_featur
1818
There is a [full example](../../examples/simple_zonal_with_acm) provided. Simple usage is as follows:
1919

2020
```tf
21+
data "google_client_config" "default" {}
22+
23+
provider "kubernetes" {
24+
host = "https://${module.gke.endpoint}"
25+
token = data.google_client_config.default.access_token
26+
cluster_ca_certificate = base64decode(module.gke.ca_certificate)
27+
}
28+
2129
module "acm" {
2230
source = "terraform-google-modules/kubernetes-engine/google//modules/acm"
2331
2432
project_id = "my-project-id"
2533
cluster_name = "my-cluster-name"
2634
location = module.gke.location
27-
cluster_endpoint = module.gke.endpoint
28-
2935
sync_repo = "[email protected]:GoogleCloudPlatform/csp-config-management.git"
3036
sync_branch = "1.0.0"
3137
policy_dir = "foo-corp"
3238
}
3339
```
3440

3541
To deploy this config:
36-
1. Run `terraform apply`
37-
2. Inspect the `git_creds_public` [output](#outputs) to retrieve the public key used for accessing Git. Whitelist this key for access to your Git repo. Instructions for some popular Git hosting providers are included for convenience:
42+
1. Configure the [Kubernetes Provider](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs) for the target cluster, for example:
43+
44+
```
45+
provider "kubernetes" {
46+
host = "https://${module.gke.endpoint}"
47+
token = data.google_client_config.default.access_token
48+
cluster_ca_certificate = base64decode(module.gke.ca_certificate)
49+
}
50+
51+
data "google_client_config" "default" {}
52+
```
53+
54+
2. Run `terraform apply`
55+
3. Inspect the `git_creds_public` [output](#outputs) to retrieve the public key used for accessing Git. Whitelist this key for access to your Git repo. Instructions for some popular Git hosting providers are included for convenience:
3856

3957
* [Cloud Souce Repositories](https://cloud.google.com/source-repositories/docs/authentication#ssh)
4058
* [Bitbucket](https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html)

0 commit comments

Comments
 (0)