Skip to content

Commit

Permalink
feat: Add ConfigConnector configuration option (beta) (#547)
Browse files Browse the repository at this point in the history
  • Loading branch information
redbaron committed May 29, 2020
1 parent d1e5d12 commit 672adf9
Show file tree
Hide file tree
Showing 23 changed files with 55 additions and 11 deletions.
4 changes: 4 additions & 0 deletions autogen/main/cluster.tf.tmpl
Expand Up @@ -164,6 +164,10 @@ resource "google_container_cluster" "primary" {
kalm_config {
enabled = var.kalm_config
}

config_connector_config {
enabled = var.config_connector
}
{% endif %}
}

Expand Down
6 changes: 6 additions & 0 deletions autogen/main/variables.tf.tmpl
Expand Up @@ -429,6 +429,12 @@ variable "kalm_config" {
default = false
}

variable "config_connector" {
type = bool
description = "(Beta) Whether ConfigConnector is enabled for this cluster."
default = false
}

variable "database_encryption" {
description = "Application-layer Secrets Encryption settings. The object format is {state = string, key_name = string}. Valid values of state are: \"ENCRYPTED\"; \"DECRYPTED\". key_name is the name of a CloudKMS key."
type = list(object({ state = string, key_name = string }))
Expand Down
2 changes: 1 addition & 1 deletion autogen/main/versions.tf.tmpl
Expand Up @@ -19,7 +19,7 @@ terraform {

required_providers {
{% if beta_cluster %}
google-beta = ">= 3.21.0, <4.0.0"
google-beta = ">= 3.23.0, <4.0.0"
{% else %}
google = ">= 3.16, <4.0.0"
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion examples/node_pool/main.tf
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google-beta" {
version = "~> 3.21.0"
version = "~> 3.23.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/node_pool_update_variant_beta/main.tf
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google-beta" {
version = "~> 3.21.0"
version = "~> 3.23.0"
credentials = file(var.credentials_path)
region = var.region
}
Expand Down
Expand Up @@ -19,5 +19,5 @@ provider "google" {
}

provider "google-beta" {
version = "3.16.0"
version = "3.23.0"
}
2 changes: 1 addition & 1 deletion examples/safer_cluster/main.tf
Expand Up @@ -34,7 +34,7 @@ provider "google" {
}

provider "google-beta" {
version = "~> 3.21.0"
version = "~> 3.23.0"
}

module "gke" {
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_regional_beta/main.tf
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google-beta" {
version = "~> 3.21.0"
version = "~> 3.23.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_regional_private_beta/main.tf
Expand Up @@ -24,7 +24,7 @@ provider "google" {
}

provider "google-beta" {
version = "~> 3.21.0"
version = "~> 3.23.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/workload_metadata_config/main.tf
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google-beta" {
version = "~> 3.21.0"
version = "~> 3.23.0"
region = var.region
}

Expand Down
1 change: 1 addition & 0 deletions modules/beta-private-cluster-update-variant/README.md
Expand Up @@ -164,6 +164,7 @@ Then perform the following commands on the root folder:
| cluster\_autoscaling | Cluster autoscaling configuration. See [more details](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters#clusterautoscaling) | object | `<map>` | no |
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | string | `"null"` | no |
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | map(string) | `<map>` | no |
| config\_connector | (Beta) Whether ConfigConnector is enabled for this cluster. | bool | `"false"` | no |
| configure\_ip\_masq | Enables the installation of ip masquerading, which is usually no longer required when using aliasied IP addresses. IP masquerading uses a kubectl call, so when you have a private cluster, you will need access to the API server. | string | `"false"` | no |
| create\_service\_account | Defines if service account specified to run nodes should be created. | bool | `"true"` | no |
| database\_encryption | Application-layer Secrets Encryption settings. The object format is {state = string, key_name = string}. Valid values of state are: "ENCRYPTED"; "DECRYPTED". key_name is the name of a CloudKMS key. | object | `<list>` | no |
Expand Down
4 changes: 4 additions & 0 deletions modules/beta-private-cluster-update-variant/cluster.tf
Expand Up @@ -149,6 +149,10 @@ resource "google_container_cluster" "primary" {
kalm_config {
enabled = var.kalm_config
}

config_connector_config {
enabled = var.config_connector
}
}

ip_allocation_policy {
Expand Down
6 changes: 6 additions & 0 deletions modules/beta-private-cluster-update-variant/variables.tf
Expand Up @@ -422,6 +422,12 @@ variable "kalm_config" {
default = false
}

variable "config_connector" {
type = bool
description = "(Beta) Whether ConfigConnector is enabled for this cluster."
default = false
}

variable "database_encryption" {
description = "Application-layer Secrets Encryption settings. The object format is {state = string, key_name = string}. Valid values of state are: \"ENCRYPTED\"; \"DECRYPTED\". key_name is the name of a CloudKMS key."
type = list(object({ state = string, key_name = string }))
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster-update-variant/versions.tf
Expand Up @@ -18,6 +18,6 @@ terraform {
required_version = "~> 0.12.6"

required_providers {
google-beta = ">= 3.21.0, <4.0.0"
google-beta = ">= 3.23.0, <4.0.0"
}
}
1 change: 1 addition & 0 deletions modules/beta-private-cluster/README.md
Expand Up @@ -142,6 +142,7 @@ Then perform the following commands on the root folder:
| cluster\_autoscaling | Cluster autoscaling configuration. See [more details](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters#clusterautoscaling) | object | `<map>` | no |
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | string | `"null"` | no |
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | map(string) | `<map>` | no |
| config\_connector | (Beta) Whether ConfigConnector is enabled for this cluster. | bool | `"false"` | no |
| configure\_ip\_masq | Enables the installation of ip masquerading, which is usually no longer required when using aliasied IP addresses. IP masquerading uses a kubectl call, so when you have a private cluster, you will need access to the API server. | string | `"false"` | no |
| create\_service\_account | Defines if service account specified to run nodes should be created. | bool | `"true"` | no |
| database\_encryption | Application-layer Secrets Encryption settings. The object format is {state = string, key_name = string}. Valid values of state are: "ENCRYPTED"; "DECRYPTED". key_name is the name of a CloudKMS key. | object | `<list>` | no |
Expand Down
4 changes: 4 additions & 0 deletions modules/beta-private-cluster/cluster.tf
Expand Up @@ -149,6 +149,10 @@ resource "google_container_cluster" "primary" {
kalm_config {
enabled = var.kalm_config
}

config_connector_config {
enabled = var.config_connector
}
}

ip_allocation_policy {
Expand Down
6 changes: 6 additions & 0 deletions modules/beta-private-cluster/variables.tf
Expand Up @@ -422,6 +422,12 @@ variable "kalm_config" {
default = false
}

variable "config_connector" {
type = bool
description = "(Beta) Whether ConfigConnector is enabled for this cluster."
default = false
}

variable "database_encryption" {
description = "Application-layer Secrets Encryption settings. The object format is {state = string, key_name = string}. Valid values of state are: \"ENCRYPTED\"; \"DECRYPTED\". key_name is the name of a CloudKMS key."
type = list(object({ state = string, key_name = string }))
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster/versions.tf
Expand Up @@ -18,6 +18,6 @@ terraform {
required_version = "~> 0.12.6"

required_providers {
google-beta = ">= 3.21.0, <4.0.0"
google-beta = ">= 3.23.0, <4.0.0"
}
}
1 change: 1 addition & 0 deletions modules/beta-public-cluster/README.md
Expand Up @@ -124,6 +124,7 @@ Then perform the following commands on the root folder:
| cluster\_autoscaling | Cluster autoscaling configuration. See [more details](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters#clusterautoscaling) | object | `<map>` | no |
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | string | `"null"` | no |
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | map(string) | `<map>` | no |
| config\_connector | (Beta) Whether ConfigConnector is enabled for this cluster. | bool | `"false"` | no |
| configure\_ip\_masq | Enables the installation of ip masquerading, which is usually no longer required when using aliasied IP addresses. IP masquerading uses a kubectl call, so when you have a private cluster, you will need access to the API server. | string | `"false"` | no |
| create\_service\_account | Defines if service account specified to run nodes should be created. | bool | `"true"` | no |
| database\_encryption | Application-layer Secrets Encryption settings. The object format is {state = string, key_name = string}. Valid values of state are: "ENCRYPTED"; "DECRYPTED". key_name is the name of a CloudKMS key. | object | `<list>` | no |
Expand Down
4 changes: 4 additions & 0 deletions modules/beta-public-cluster/cluster.tf
Expand Up @@ -149,6 +149,10 @@ resource "google_container_cluster" "primary" {
kalm_config {
enabled = var.kalm_config
}

config_connector_config {
enabled = var.config_connector
}
}

ip_allocation_policy {
Expand Down
6 changes: 6 additions & 0 deletions modules/beta-public-cluster/variables.tf
Expand Up @@ -398,6 +398,12 @@ variable "kalm_config" {
default = false
}

variable "config_connector" {
type = bool
description = "(Beta) Whether ConfigConnector is enabled for this cluster."
default = false
}

variable "database_encryption" {
description = "Application-layer Secrets Encryption settings. The object format is {state = string, key_name = string}. Valid values of state are: \"ENCRYPTED\"; \"DECRYPTED\". key_name is the name of a CloudKMS key."
type = list(object({ state = string, key_name = string }))
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster/versions.tf
Expand Up @@ -18,6 +18,6 @@ terraform {
required_version = "~> 0.12.6"

required_providers {
google-beta = ">= 3.21.0, <4.0.0"
google-beta = ">= 3.23.0, <4.0.0"
}
}
1 change: 1 addition & 0 deletions test/integration/beta_cluster/controls/gcloud.rb
Expand Up @@ -56,6 +56,7 @@
"disabled" => true,
},
"kalmConfig" => {},
"configConnectorConfig" => {},
"networkPolicyConfig" => {},
"istioConfig" => {"auth"=>"AUTH_MUTUAL_TLS"},
"cloudRunConfig" => {},
Expand Down

0 comments on commit 672adf9

Please sign in to comment.