Skip to content

Commit

Permalink
Add supported values of APISERVER, CONTROLLER_MANAGER, and SCHEDULER …
Browse files Browse the repository at this point in the history
…to monitoring_config (#6352)
  • Loading branch information
yungdarek122 authored Aug 3, 2022
1 parent 645b328 commit f741810
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions mmv1/third_party/terraform/resources/resource_container_cluster.go.erb
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -812,18 +812,18 @@ func resourceContainerCluster() *schema.Resource {
Type: schema.TypeList,
<% if version == "ga" -%>
Required: true,
Description: `GKE components exposing metrics. Valid values include SYSTEM_COMPONENTS.`,
Description: `GKE components exposing metrics. Valid values include SYSTEM_COMPONENTS, APISERVER, CONTROLLER_MANAGER, and SCHEDULER.`,
<% else -%>
Optional: true,
Computed: true,
Description: `GKE components exposing metrics. Valid values include SYSTEM_COMPONENTS and WORKLOADS.`,
Description: `GKE components exposing metrics. Valid values include SYSTEM_COMPONENTS, APISERVER, CONTROLLER_MANAGER, SCHEDULER, and WORKLOADS.`,
<% end -%>
Elem: &schema.Schema{
Type: schema.TypeString,
<% if version == "ga" -%>
ValidateFunc: validation.StringInSlice([]string{"SYSTEM_COMPONENTS"}, false),
ValidateFunc: validation.StringInSlice([]string{"SYSTEM_COMPONENTS", "APISERVER", "CONTROLLER_MANAGER", "SCHEDULER"}, false),
<% else -%>
ValidateFunc: validation.StringInSlice([]string{"SYSTEM_COMPONENTS", "WORKLOADS"}, false),
ValidateFunc: validation.StringInSlice([]string{"SYSTEM_COMPONENTS", "APISERVER", "CONTROLLER_MANAGER", "SCHEDULER", "WORKLOADS"}, false),
<% end -%>
},
},
Expand Down
6 changes: 3 additions & 3 deletions mmv1/third_party/terraform/tests/resource_container_cluster_test.go.erb
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5536,7 +5536,7 @@ resource "google_container_cluster" "primary" {
location = "us-central1-a"
initial_node_count = 1
monitoring_config {
enable_components = [ "SYSTEM_COMPONENTS" ]
enable_components = [ "SYSTEM_COMPONENTS", "APISERVER", "CONTROLLER_MANAGER", "SCHEDULER" ]
}
}
`, name)
Expand All @@ -5550,7 +5550,7 @@ resource "google_container_cluster" "primary" {
location = "us-central1-a"
initial_node_count = 1
monitoring_config {
enable_components = [ "SYSTEM_COMPONENTS", "WORKLOADS" ]
enable_components = [ "SYSTEM_COMPONENTS", "APISERVER", "CONTROLLER_MANAGER", "SCHEDULER", "WORKLOADS" ]
}
}
`, name)
Expand All @@ -5563,7 +5563,7 @@ resource "google_container_cluster" "primary" {
location = "us-central1-a"
initial_node_count = 1
monitoring_config {
enable_components = [ "SYSTEM_COMPONENTS", "WORKLOADS" ]
enable_components = [ "SYSTEM_COMPONENTS", "APISERVER", "CONTROLLER_MANAGER", "SCHEDULER", "WORKLOADS" ]
managed_prometheus {
enabled = true
}
Expand Down
2 changes: 1 addition & 1 deletion mmv1/third_party/terraform/website/docs/r/container_cluster.html.markdown
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ as "Intel Haswell" or "Intel Sandy Bridge".

<a name="nested_monitoring_config"></a>The `monitoring_config` block supports:

* `enable_components` - (Optional) The GKE components exposing metrics. `SYSTEM_COMPONENTS` and in beta provider, both `SYSTEM_COMPONENTS` and `WORKLOADS` are supported. (`WORKLOADS` is deprecated and removed in GKE 1.24.)
* `enable_components` - (Optional) The GKE components exposing metrics. Supported values include: `SYSTEM_COMPONENTS`, `APISERVER`, `CONTROLLER_MANAGER`, and `SCHEDULER`. In beta provider, `WORKLOADS` is supported on top of those 4 values. (`WORKLOADS` is deprecated and removed in GKE 1.24.)

* `managed_prometheus` - (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) Configuration for Managed Service for Prometheus. Structure is [documented below](#nested_managed_prometheus).

Expand Down

0 comments on commit f741810

Please sign in to comment.