Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ Then perform the following commands on the root folder:
| maintenance\_recurrence | Frequency of the recurring maintenance window in RFC5545 format. | `string` | `""` | no |
| maintenance\_start\_time | Time window specified for daily or recurring maintenance operations in RFC3339 format | `string` | `"05:00"` | no |
| master\_authorized\_networks | List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists). | `list(object({ cidr_block = string, display_name = string }))` | `[]` | no |
| monitoring\_auto\_monitoring\_config\_scope | Whether or not to enable GKE Auto-Monitoring. Supported values include: ALL, NONE | `string` | `"NONE"` | no |
| monitoring\_enable\_managed\_prometheus | Configuration for Managed Service for Prometheus. Whether or not the managed collection is enabled. | `bool` | `null` | no |
| monitoring\_enable\_observability\_metrics | Whether or not the advanced datapath metrics are enabled. | `bool` | `false` | no |
| monitoring\_enable\_observability\_relay | Whether or not the advanced datapath relay is enabled. | `bool` | `false` | no |
Expand Down
6 changes: 6 additions & 0 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ resource "google_container_cluster" "primary" {
{% if autopilot_cluster != true %}
managed_prometheus {
enabled = var.monitoring_enable_managed_prometheus == null ? false : var.monitoring_enable_managed_prometheus
dynamic "auto_monitoring_config" {
for_each = var.monitoring_enable_managed_prometheus == true && var.monitoring_auto_monitoring_config_scope != null ? [1] : []
content {
scope = var.monitoring_auto_monitoring_config_scope
}
}
}
advanced_datapath_observability_config {
enable_metrics = var.monitoring_enable_observability_metrics
Expand Down
17 changes: 17 additions & 0 deletions autogen/main/variables.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,23 @@ variable "monitoring_enable_managed_prometheus" {
default = null
}

variable "monitoring_auto_monitoring_config_scope" {
default = "NONE"
description = "Whether or not to enable GKE Auto-Monitoring. Supported values include: ALL, NONE"
type = string

validation {
condition = contains(
[
"ALL",
"NONE",
],
var.monitoring_auto_monitoring_config_scope
)
error_message = "'monitoring_auto_monitoring_config_scope' value is invalid"
}
}

variable "monitoring_enable_observability_metrics" {
type = bool
description = "Whether or not the advanced datapath metrics are enabled."
Expand Down
6 changes: 6 additions & 0 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ resource "google_container_cluster" "primary" {
enable_components = var.monitoring_enabled_components
managed_prometheus {
enabled = var.monitoring_enable_managed_prometheus == null ? false : var.monitoring_enable_managed_prometheus
dynamic "auto_monitoring_config" {
for_each = var.monitoring_enable_managed_prometheus == true && var.monitoring_auto_monitoring_config_scope != null ? [1] : []
content {
scope = var.monitoring_auto_monitoring_config_scope
}
}
}
advanced_datapath_observability_config {
enable_metrics = var.monitoring_enable_observability_metrics
Expand Down
4 changes: 4 additions & 0 deletions metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,10 @@ spec:
- name: monitoring_enable_managed_prometheus
description: Configuration for Managed Service for Prometheus. Whether or not the managed collection is enabled.
varType: bool
- name: monitoring_auto_monitoring_config_scope
description: "Whether or not to enable GKE Auto-Monitoring. Supported values include: ALL, NONE"
varType: string
defaultValue: NONE
- name: monitoring_enable_observability_metrics
description: Whether or not the advanced datapath metrics are enabled.
varType: bool
Expand Down
1 change: 1 addition & 0 deletions modules/beta-private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ Then perform the following commands on the root folder:
| master\_authorized\_networks | List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists). | `list(object({ cidr_block = string, display_name = string }))` | `[]` | no |
| master\_global\_access\_enabled | Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint. | `bool` | `true` | no |
| master\_ipv4\_cidr\_block | (Optional) The IP range in CIDR notation to use for the hosted master network. | `string` | `null` | no |
| monitoring\_auto\_monitoring\_config\_scope | Whether or not to enable GKE Auto-Monitoring. Supported values include: ALL, NONE | `string` | `"NONE"` | no |
| monitoring\_enable\_managed\_prometheus | Configuration for Managed Service for Prometheus. Whether or not the managed collection is enabled. | `bool` | `null` | no |
| monitoring\_enable\_observability\_metrics | Whether or not the advanced datapath metrics are enabled. | `bool` | `false` | no |
| monitoring\_enable\_observability\_relay | Whether or not the advanced datapath relay is enabled. | `bool` | `false` | no |
Expand Down
6 changes: 6 additions & 0 deletions modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ resource "google_container_cluster" "primary" {
enable_components = var.monitoring_enabled_components
managed_prometheus {
enabled = var.monitoring_enable_managed_prometheus == null ? false : var.monitoring_enable_managed_prometheus
dynamic "auto_monitoring_config" {
for_each = var.monitoring_enable_managed_prometheus == true && var.monitoring_auto_monitoring_config_scope != null ? [1] : []
content {
scope = var.monitoring_auto_monitoring_config_scope
}
}
}
advanced_datapath_observability_config {
enable_metrics = var.monitoring_enable_observability_metrics
Expand Down
4 changes: 4 additions & 0 deletions modules/beta-private-cluster-update-variant/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,10 @@ spec:
- name: monitoring_enable_managed_prometheus
description: Configuration for Managed Service for Prometheus. Whether or not the managed collection is enabled.
varType: bool
- name: monitoring_auto_monitoring_config_scope
description: "Whether or not to enable GKE Auto-Monitoring. Supported values include: ALL, NONE"
varType: string
defaultValue: NONE
- name: monitoring_enable_observability_metrics
description: Whether or not the advanced datapath metrics are enabled.
varType: bool
Expand Down
17 changes: 17 additions & 0 deletions modules/beta-private-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,23 @@ variable "monitoring_enable_managed_prometheus" {
default = null
}

variable "monitoring_auto_monitoring_config_scope" {
default = "NONE"
description = "Whether or not to enable GKE Auto-Monitoring. Supported values include: ALL, NONE"
type = string

validation {
condition = contains(
[
"ALL",
"NONE",
],
var.monitoring_auto_monitoring_config_scope
)
error_message = "'monitoring_auto_monitoring_config_scope' value is invalid"
}
}

variable "monitoring_enable_observability_metrics" {
type = bool
description = "Whether or not the advanced datapath metrics are enabled."
Expand Down
1 change: 1 addition & 0 deletions modules/beta-private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ Then perform the following commands on the root folder:
| master\_authorized\_networks | List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists). | `list(object({ cidr_block = string, display_name = string }))` | `[]` | no |
| master\_global\_access\_enabled | Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint. | `bool` | `true` | no |
| master\_ipv4\_cidr\_block | (Optional) The IP range in CIDR notation to use for the hosted master network. | `string` | `null` | no |
| monitoring\_auto\_monitoring\_config\_scope | Whether or not to enable GKE Auto-Monitoring. Supported values include: ALL, NONE | `string` | `"NONE"` | no |
| monitoring\_enable\_managed\_prometheus | Configuration for Managed Service for Prometheus. Whether or not the managed collection is enabled. | `bool` | `null` | no |
| monitoring\_enable\_observability\_metrics | Whether or not the advanced datapath metrics are enabled. | `bool` | `false` | no |
| monitoring\_enable\_observability\_relay | Whether or not the advanced datapath relay is enabled. | `bool` | `false` | no |
Expand Down
6 changes: 6 additions & 0 deletions modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ resource "google_container_cluster" "primary" {
enable_components = var.monitoring_enabled_components
managed_prometheus {
enabled = var.monitoring_enable_managed_prometheus == null ? false : var.monitoring_enable_managed_prometheus
dynamic "auto_monitoring_config" {
for_each = var.monitoring_enable_managed_prometheus == true && var.monitoring_auto_monitoring_config_scope != null ? [1] : []
content {
scope = var.monitoring_auto_monitoring_config_scope
}
}
}
advanced_datapath_observability_config {
enable_metrics = var.monitoring_enable_observability_metrics
Expand Down
4 changes: 4 additions & 0 deletions modules/beta-private-cluster/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,10 @@ spec:
- name: monitoring_enable_managed_prometheus
description: Configuration for Managed Service for Prometheus. Whether or not the managed collection is enabled.
varType: bool
- name: monitoring_auto_monitoring_config_scope
description: "Whether or not to enable GKE Auto-Monitoring. Supported values include: ALL, NONE"
varType: string
defaultValue: NONE
- name: monitoring_enable_observability_metrics
description: Whether or not the advanced datapath metrics are enabled.
varType: bool
Expand Down
17 changes: 17 additions & 0 deletions modules/beta-private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,23 @@ variable "monitoring_enable_managed_prometheus" {
default = null
}

variable "monitoring_auto_monitoring_config_scope" {
default = "NONE"
description = "Whether or not to enable GKE Auto-Monitoring. Supported values include: ALL, NONE"
type = string

validation {
condition = contains(
[
"ALL",
"NONE",
],
var.monitoring_auto_monitoring_config_scope
)
error_message = "'monitoring_auto_monitoring_config_scope' value is invalid"
}
}

variable "monitoring_enable_observability_metrics" {
type = bool
description = "Whether or not the advanced datapath metrics are enabled."
Expand Down
1 change: 1 addition & 0 deletions modules/beta-public-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ Then perform the following commands on the root folder:
| maintenance\_recurrence | Frequency of the recurring maintenance window in RFC5545 format. | `string` | `""` | no |
| maintenance\_start\_time | Time window specified for daily or recurring maintenance operations in RFC3339 format | `string` | `"05:00"` | no |
| master\_authorized\_networks | List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists). | `list(object({ cidr_block = string, display_name = string }))` | `[]` | no |
| monitoring\_auto\_monitoring\_config\_scope | Whether or not to enable GKE Auto-Monitoring. Supported values include: ALL, NONE | `string` | `"NONE"` | no |
| monitoring\_enable\_managed\_prometheus | Configuration for Managed Service for Prometheus. Whether or not the managed collection is enabled. | `bool` | `null` | no |
| monitoring\_enable\_observability\_metrics | Whether or not the advanced datapath metrics are enabled. | `bool` | `false` | no |
| monitoring\_enable\_observability\_relay | Whether or not the advanced datapath relay is enabled. | `bool` | `false` | no |
Expand Down
6 changes: 6 additions & 0 deletions modules/beta-public-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ resource "google_container_cluster" "primary" {
enable_components = var.monitoring_enabled_components
managed_prometheus {
enabled = var.monitoring_enable_managed_prometheus == null ? false : var.monitoring_enable_managed_prometheus
dynamic "auto_monitoring_config" {
for_each = var.monitoring_enable_managed_prometheus == true && var.monitoring_auto_monitoring_config_scope != null ? [1] : []
content {
scope = var.monitoring_auto_monitoring_config_scope
}
}
}
advanced_datapath_observability_config {
enable_metrics = var.monitoring_enable_observability_metrics
Expand Down
4 changes: 4 additions & 0 deletions modules/beta-public-cluster-update-variant/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,10 @@ spec:
- name: monitoring_enable_managed_prometheus
description: Configuration for Managed Service for Prometheus. Whether or not the managed collection is enabled.
varType: bool
- name: monitoring_auto_monitoring_config_scope
description: "Whether or not to enable GKE Auto-Monitoring. Supported values include: ALL, NONE"
varType: string
defaultValue: NONE
- name: monitoring_enable_observability_metrics
description: Whether or not the advanced datapath metrics are enabled.
varType: bool
Expand Down
17 changes: 17 additions & 0 deletions modules/beta-public-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,23 @@ variable "monitoring_enable_managed_prometheus" {
default = null
}

variable "monitoring_auto_monitoring_config_scope" {
default = "NONE"
description = "Whether or not to enable GKE Auto-Monitoring. Supported values include: ALL, NONE"
type = string

validation {
condition = contains(
[
"ALL",
"NONE",
],
var.monitoring_auto_monitoring_config_scope
)
error_message = "'monitoring_auto_monitoring_config_scope' value is invalid"
}
}

variable "monitoring_enable_observability_metrics" {
type = bool
description = "Whether or not the advanced datapath metrics are enabled."
Expand Down
1 change: 1 addition & 0 deletions modules/beta-public-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ Then perform the following commands on the root folder:
| maintenance\_recurrence | Frequency of the recurring maintenance window in RFC5545 format. | `string` | `""` | no |
| maintenance\_start\_time | Time window specified for daily or recurring maintenance operations in RFC3339 format | `string` | `"05:00"` | no |
| master\_authorized\_networks | List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists). | `list(object({ cidr_block = string, display_name = string }))` | `[]` | no |
| monitoring\_auto\_monitoring\_config\_scope | Whether or not to enable GKE Auto-Monitoring. Supported values include: ALL, NONE | `string` | `"NONE"` | no |
| monitoring\_enable\_managed\_prometheus | Configuration for Managed Service for Prometheus. Whether or not the managed collection is enabled. | `bool` | `null` | no |
| monitoring\_enable\_observability\_metrics | Whether or not the advanced datapath metrics are enabled. | `bool` | `false` | no |
| monitoring\_enable\_observability\_relay | Whether or not the advanced datapath relay is enabled. | `bool` | `false` | no |
Expand Down
6 changes: 6 additions & 0 deletions modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ resource "google_container_cluster" "primary" {
enable_components = var.monitoring_enabled_components
managed_prometheus {
enabled = var.monitoring_enable_managed_prometheus == null ? false : var.monitoring_enable_managed_prometheus
dynamic "auto_monitoring_config" {
for_each = var.monitoring_enable_managed_prometheus == true && var.monitoring_auto_monitoring_config_scope != null ? [1] : []
content {
scope = var.monitoring_auto_monitoring_config_scope
}
}
}
advanced_datapath_observability_config {
enable_metrics = var.monitoring_enable_observability_metrics
Expand Down
4 changes: 4 additions & 0 deletions modules/beta-public-cluster/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,10 @@ spec:
- name: monitoring_enable_managed_prometheus
description: Configuration for Managed Service for Prometheus. Whether or not the managed collection is enabled.
varType: bool
- name: monitoring_auto_monitoring_config_scope
description: "Whether or not to enable GKE Auto-Monitoring. Supported values include: ALL, NONE"
varType: string
defaultValue: NONE
- name: monitoring_enable_observability_metrics
description: Whether or not the advanced datapath metrics are enabled.
varType: bool
Expand Down
17 changes: 17 additions & 0 deletions modules/beta-public-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,23 @@ variable "monitoring_enable_managed_prometheus" {
default = null
}

variable "monitoring_auto_monitoring_config_scope" {
default = "NONE"
description = "Whether or not to enable GKE Auto-Monitoring. Supported values include: ALL, NONE"
type = string

validation {
condition = contains(
[
"ALL",
"NONE",
],
var.monitoring_auto_monitoring_config_scope
)
error_message = "'monitoring_auto_monitoring_config_scope' value is invalid"
}
}

variable "monitoring_enable_observability_metrics" {
type = bool
description = "Whether or not the advanced datapath metrics are enabled."
Expand Down
1 change: 1 addition & 0 deletions modules/private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ Then perform the following commands on the root folder:
| master\_authorized\_networks | List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists). | `list(object({ cidr_block = string, display_name = string }))` | `[]` | no |
| master\_global\_access\_enabled | Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint. | `bool` | `true` | no |
| master\_ipv4\_cidr\_block | (Optional) The IP range in CIDR notation to use for the hosted master network. | `string` | `null` | no |
| monitoring\_auto\_monitoring\_config\_scope | Whether or not to enable GKE Auto-Monitoring. Supported values include: ALL, NONE | `string` | `"NONE"` | no |
| monitoring\_enable\_managed\_prometheus | Configuration for Managed Service for Prometheus. Whether or not the managed collection is enabled. | `bool` | `null` | no |
| monitoring\_enable\_observability\_metrics | Whether or not the advanced datapath metrics are enabled. | `bool` | `false` | no |
| monitoring\_enable\_observability\_relay | Whether or not the advanced datapath relay is enabled. | `bool` | `false` | no |
Expand Down
6 changes: 6 additions & 0 deletions modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ resource "google_container_cluster" "primary" {
enable_components = var.monitoring_enabled_components
managed_prometheus {
enabled = var.monitoring_enable_managed_prometheus == null ? false : var.monitoring_enable_managed_prometheus
dynamic "auto_monitoring_config" {
for_each = var.monitoring_enable_managed_prometheus == true && var.monitoring_auto_monitoring_config_scope != null ? [1] : []
content {
scope = var.monitoring_auto_monitoring_config_scope
}
}
}
advanced_datapath_observability_config {
enable_metrics = var.monitoring_enable_observability_metrics
Expand Down
4 changes: 4 additions & 0 deletions modules/private-cluster-update-variant/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,10 @@ spec:
- name: monitoring_enable_managed_prometheus
description: Configuration for Managed Service for Prometheus. Whether or not the managed collection is enabled.
varType: bool
- name: monitoring_auto_monitoring_config_scope
description: "Whether or not to enable GKE Auto-Monitoring. Supported values include: ALL, NONE"
varType: string
defaultValue: NONE
- name: monitoring_enable_observability_metrics
description: Whether or not the advanced datapath metrics are enabled.
varType: bool
Expand Down
17 changes: 17 additions & 0 deletions modules/private-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,23 @@ variable "monitoring_enable_managed_prometheus" {
default = null
}

variable "monitoring_auto_monitoring_config_scope" {
default = "NONE"
description = "Whether or not to enable GKE Auto-Monitoring. Supported values include: ALL, NONE"
type = string

validation {
condition = contains(
[
"ALL",
"NONE",
],
var.monitoring_auto_monitoring_config_scope
)
error_message = "'monitoring_auto_monitoring_config_scope' value is invalid"
}
}

variable "monitoring_enable_observability_metrics" {
type = bool
description = "Whether or not the advanced datapath metrics are enabled."
Expand Down
Loading