From 091be0cf3a1cd054b7c564e1b5a62fc3ffd08b6a Mon Sep 17 00:00:00 2001 From: "Stephen Lewis (Burrows)" Date: Fri, 14 May 2021 11:55:59 -0700 Subject: [PATCH] Upstream tpgb 3238: docs for cluster notification_config (#4786) * Added docs for notification_config Signed-off-by: Eike Wichern <13048266+e96wic@users.noreply.github.com> * Tweaks to make docstrings for cluster notification_config more consistent Co-authored-by: Eike Wichern <13048266+e96wic@users.noreply.github.com> --- .../resource_container_cluster.go.erb | 2 +- .../docs/r/container_cluster.html.markdown | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/mmv1/third_party/terraform/resources/resource_container_cluster.go.erb b/mmv1/third_party/terraform/resources/resource_container_cluster.go.erb index 16d9bd43bd6f..36b7bfd83273 100644 --- a/mmv1/third_party/terraform/resources/resource_container_cluster.go.erb +++ b/mmv1/third_party/terraform/resources/resource_container_cluster.go.erb @@ -674,7 +674,7 @@ func resourceContainerCluster() *schema.Resource { "topic": { Type: schema.TypeString, Optional: true, - Description: `The Cloud Pub/Sub topic to send the notification to, must be in the format: projects/{project}/topics/{topic}`, + Description: `The pubsub topic to push upgrade notifications to. Must be in the same project as the cluster. Must be in the format: projects/{project}/topics/{topic}.`, }, }, }, diff --git a/mmv1/third_party/terraform/website/docs/r/container_cluster.html.markdown b/mmv1/third_party/terraform/website/docs/r/container_cluster.html.markdown index 9164c0985065..3ccff47832bf 100644 --- a/mmv1/third_party/terraform/website/docs/r/container_cluster.html.markdown +++ b/mmv1/third_party/terraform/website/docs/r/container_cluster.html.markdown @@ -251,6 +251,8 @@ region are guaranteed to support the same version. `version_prefix` field to approximate fuzzy versions in a Terraform-compatible way. To update nodes in other node pools, use the `version` attribute on the node pool. +* `notification_config` - (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) Configuration for the [cluster upgrade notifications](https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-upgrade-notifications) feature. Structure is documented below. + * `pod_security_policy_config` - (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) Configuration for the [PodSecurityPolicy](https://cloud.google.com/kubernetes-engine/docs/how-to/pod-security-policies) feature. Structure is documented below. @@ -711,6 +713,25 @@ workload_identity_config { } ``` +The `notification_config` block supports: + +* `pubsub` (Required) - The pubsub config for the cluster's upgrade notifications. + +The `pubsub` block supports: + +* `enabled` (Required) - Whether or not the notification config is enabled + +* `topic` (Optional) - The pubsub topic to push upgrade notifications to. Must be in the same project as the cluster. Must be in the format: `projects/{project}/topics/{topic}`. + +```hcl +notification_config { + pubsub { + enabled = true + topic = google_pubsub_topic.notifications.id + } +} +``` + The `pod_security_policy_config` block supports: * `enabled` (Required) - Enable the PodSecurityPolicy controller for this cluster.