Skip to content

Commit

Permalink
Container_cluster: enables GKE workload metrics (#5292)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Suarez <[email protected]>
  • Loading branch information
geojaz and ScottSuarez authored Oct 13, 2021
1 parent 63440d8 commit 464a79d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,7 @@ func resourceContainerCluster() *schema.Resource {
},
},


"monitoring_config": {
Type: schema.TypeList,
Optional: true,
Expand All @@ -681,10 +682,20 @@ func resourceContainerCluster() *schema.Resource {
"enable_components": {
Type: schema.TypeList,
Required: true,
<% if version == "ga" -%>
Description: `GKE components exposing metrics. Valid values include SYSTEM_COMPONENTS.`,
<% end -%>
<% if version == "beta" -%>
Description: `GKE components exposing metrics. Valid values include SYSTEM_COMPONENTS and WORKLOADS.`,
<% end -%>
Elem: &schema.Schema{
Type: schema.TypeString,
<% if version == "ga" -%>
ValidateFunc: validation.StringInSlice([]string{"SYSTEM_COMPONENTS"}, false),
<% end -%>
<% if version == "beta" -%>
ValidateFunc: validation.StringInSlice([]string{"SYSTEM_COMPONENTS", "WORKLOADS"}, false),
<% end -%>
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,7 @@ The `logging_config` block supports:

The `monitoring_config` block supports:

* `enable_components` - (Required) The GKE components exposing logs. Only `SYSTEM_COMPONENTS`
is supported.
* `enable_components` - (Required) The GKE components exposing logs. `SYSTEM_COMPONENTS` and in beta provider, both `SYSTEM_COMPONENTS` and `WORKLOADS` are supported.

The `maintenance_policy` block supports:
* `daily_maintenance_window` - (Optional) structure documented below.
Expand Down

0 comments on commit 464a79d

Please sign in to comment.