Skip to content
Open
Show file tree
Hide file tree
Changes from all 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 @@ -223,6 +223,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 @@ -1010,6 +1010,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 @@ -716,6 +716,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 @@ -267,6 +267,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 @@ -709,6 +709,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 @@ -954,6 +954,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 @@ -245,6 +245,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 @@ -709,6 +709,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 @@ -954,6 +954,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 @@ -256,6 +256,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 @@ -687,6 +687,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 @@ -918,6 +918,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 @@ -234,6 +234,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 @@ -687,6 +687,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 @@ -918,6 +918,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 @@ -256,6 +256,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 @@ -698,6 +698,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 @@ -936,6 +936,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