Skip to content

Commit

Permalink
Upstream tpgb 3238: docs for cluster notification_config (#4786)
Browse files Browse the repository at this point in the history
* Added docs for notification_config

Signed-off-by: Eike Wichern <[email protected]>

* Tweaks to make docstrings for cluster notification_config more consistent

Co-authored-by: Eike Wichern <[email protected]>
  • Loading branch information
melinath and e96wic authored May 14, 2021
1 parent 2cd66de commit 091be0c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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}.`,
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 091be0c

Please sign in to comment.