From f84e838bf8c8d01f8f60176a2b3140800cf3ec3b Mon Sep 17 00:00:00 2001 From: marko7460 Date: Fri, 16 Oct 2020 08:52:41 -0700 Subject: [PATCH] fix: removing gcloud_skip_download variable (#712) --- README.md | 4 +++- autogen/main/README.md | 3 +++ autogen/main/cluster.tf.tmpl | 1 - autogen/main/dns.tf.tmpl | 1 - autogen/main/variables.tf.tmpl | 6 ------ cluster.tf | 3 +-- dns.tf | 1 - modules/acm/README.md | 1 - modules/acm/main.tf | 1 - modules/acm/variables.tf | 6 ------ modules/asm/README.md | 1 - modules/asm/main.tf | 1 - modules/asm/variables.tf | 6 ------ modules/beta-private-cluster-update-variant/README.md | 4 +++- .../beta-private-cluster-update-variant/cluster.tf | 3 +-- modules/beta-private-cluster-update-variant/dns.tf | 1 - .../beta-private-cluster-update-variant/variables.tf | 6 ------ modules/beta-private-cluster/README.md | 4 +++- modules/beta-private-cluster/cluster.tf | 3 +-- modules/beta-private-cluster/dns.tf | 1 - modules/beta-private-cluster/variables.tf | 6 ------ modules/beta-public-cluster-update-variant/README.md | 4 +++- modules/beta-public-cluster-update-variant/cluster.tf | 3 +-- modules/beta-public-cluster-update-variant/dns.tf | 1 - .../beta-public-cluster-update-variant/variables.tf | 6 ------ modules/beta-public-cluster/README.md | 4 +++- modules/beta-public-cluster/cluster.tf | 3 +-- modules/beta-public-cluster/dns.tf | 1 - modules/beta-public-cluster/variables.tf | 6 ------ modules/config-sync/README.md | 1 - modules/config-sync/main.tf | 1 - modules/config-sync/variables.tf | 6 ------ modules/hub/README.md | 1 - modules/hub/main.tf | 1 - modules/hub/variables.tf | 6 ------ modules/k8s-operator-crd-support/main.tf | 11 +++-------- modules/k8s-operator-crd-support/variables.tf | 6 ------ modules/private-cluster-update-variant/README.md | 4 +++- modules/private-cluster-update-variant/cluster.tf | 3 +-- modules/private-cluster-update-variant/dns.tf | 1 - modules/private-cluster-update-variant/variables.tf | 6 ------ modules/private-cluster/README.md | 4 +++- modules/private-cluster/cluster.tf | 3 +-- modules/private-cluster/dns.tf | 1 - modules/private-cluster/variables.tf | 6 ------ variables.tf | 6 ------ 46 files changed, 34 insertions(+), 124 deletions(-) diff --git a/README.md b/README.md index ed106b14b..18b1195db 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,6 @@ Then perform the following commands on the root folder: | enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster | bool | `"true"` | no | | firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers | list(string) | `` | no | | firewall\_priority | Priority rule for firewall rules | number | `"1000"` | no | -| gcloud\_skip\_download | Whether to skip downloading gcloud (assumes gcloud is already available outside the module) | bool | `"true"` | no | | gcloud\_upgrade | Whether to upgrade gcloud at runtime | bool | `"false"` | no | | grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer role. | bool | `"false"` | no | | horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | bool | `"true"` | no | @@ -252,6 +251,9 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog #### Terraform and Plugins - [Terraform](https://www.terraform.io/downloads.html) 0.12 - [Terraform Provider for GCP][terraform-provider-google] v3.41 +#### gcloud +Some submodules use the [terraform-google-gcloud](https://github.com/terraform-google-modules/terraform-google-gcloud) module. By default, this module assumes you already have gcloud installed in your $PATH. +See the [module](https://github.com/terraform-google-modules/terraform-google-gcloud#downloading) documentation for more information. ### Configure a Service Account In order to execute this module you must have a Service Account with the diff --git a/autogen/main/README.md b/autogen/main/README.md index 0a1eb6a4c..b472dcdbb 100644 --- a/autogen/main/README.md +++ b/autogen/main/README.md @@ -213,6 +213,9 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog {% else %} - [Terraform Provider for GCP][terraform-provider-google] v3.41 {% endif %} +#### gcloud +Some submodules use the [terraform-google-gcloud](https://github.com/terraform-google-modules/terraform-google-gcloud) module. By default, this module assumes you already have gcloud installed in your $PATH. +See the [module](https://github.com/terraform-google-modules/terraform-google-gcloud#downloading) documentation for more information. ### Configure a Service Account In order to execute this module you must have a Service Account with the diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index 4a14b75ba..ecf305b7b 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -538,7 +538,6 @@ module "gcloud_wait_for_cluster" { enabled = ! var.skip_provisioners upgrade = var.gcloud_upgrade - skip_download = var.gcloud_skip_download create_cmd_entrypoint = "${path.module}/scripts/wait-for-cluster.sh" create_cmd_body = "${var.project_id} ${var.name}" diff --git a/autogen/main/dns.tf.tmpl b/autogen/main/dns.tf.tmpl index 6aa2ca746..a7251ec7b 100644 --- a/autogen/main/dns.tf.tmpl +++ b/autogen/main/dns.tf.tmpl @@ -27,7 +27,6 @@ module "gcloud_delete_default_kube_dns_configmap" { cluster_location = google_container_cluster.primary.location project_id = var.project_id upgrade = var.gcloud_upgrade - skip_download = var.gcloud_skip_download kubectl_create_command = "${path.module}/scripts/delete-default-resource.sh kube-system configmap kube-dns" diff --git a/autogen/main/variables.tf.tmpl b/autogen/main/variables.tf.tmpl index dc097ada6..de4af2700 100644 --- a/autogen/main/variables.tf.tmpl +++ b/autogen/main/variables.tf.tmpl @@ -548,12 +548,6 @@ variable "gcloud_upgrade" { default = false } -variable "gcloud_skip_download" { - type = bool - description = "Whether to skip downloading gcloud (assumes gcloud is already available outside the module)" - default = true -} - {% if beta_cluster %} variable "disable_default_snat" { type = bool diff --git a/cluster.tf b/cluster.tf index acda1e1ac..9b1ecde45 100644 --- a/cluster.tf +++ b/cluster.tf @@ -321,8 +321,7 @@ module "gcloud_wait_for_cluster" { version = "~> 2.0.2" enabled = ! var.skip_provisioners - upgrade = var.gcloud_upgrade - skip_download = var.gcloud_skip_download + upgrade = var.gcloud_upgrade create_cmd_entrypoint = "${path.module}/scripts/wait-for-cluster.sh" create_cmd_body = "${var.project_id} ${var.name}" diff --git a/dns.tf b/dns.tf index 262b4a832..e0f86a819 100644 --- a/dns.tf +++ b/dns.tf @@ -27,7 +27,6 @@ module "gcloud_delete_default_kube_dns_configmap" { cluster_location = google_container_cluster.primary.location project_id = var.project_id upgrade = var.gcloud_upgrade - skip_download = var.gcloud_skip_download kubectl_create_command = "${path.module}/scripts/delete-default-resource.sh kube-system configmap kube-dns" diff --git a/modules/acm/README.md b/modules/acm/README.md index 71f2d61fb..f1edd81c0 100644 --- a/modules/acm/README.md +++ b/modules/acm/README.md @@ -57,7 +57,6 @@ By default, this module will attempt to download the ACM operator from Google di | project\_id | GCP project_id used to reach cluster. | string | n/a | yes | | secret\_type | git authentication secret type, is passed through to ConfigManagement spec.git.secretType. Overriden to value 'ssh' if `create_ssh_key` is true | string | `"ssh"` | no | | service\_account\_key\_file | Path to service account key file to auth as for running `gcloud container clusters get-credentials`. | string | `""` | no | -| skip\_gcloud\_download | Whether to skip downloading gcloud (assumes gcloud and kubectl already available outside the module) | bool | `"true"` | no | | source\_format | Configures a non-hierarchical repo if set to 'unstructured'. Uses [ACM defaults](https://cloud.google.com/anthos-config-management/docs/how-to/installing#configuring-config-management-operator) when unset. | string | `""` | no | | ssh\_auth\_key | Key for Git authentication. Overrides 'create_ssh_key' variable. Can be set using 'file(path/to/file)'-function. | string | `"null"` | no | | sync\_branch | ACM repo Git branch. If un-set, uses Config Management default. | string | `""` | no | diff --git a/modules/acm/main.tf b/modules/acm/main.tf index 4a47fc6c4..244816f99 100644 --- a/modules/acm/main.tf +++ b/modules/acm/main.tf @@ -31,7 +31,6 @@ module "acm_operator" { ssh_auth_key = var.ssh_auth_key enable_policy_controller = var.enable_policy_controller install_template_library = var.install_template_library - skip_gcloud_download = var.skip_gcloud_download source_format = var.source_format hierarchy_controller = var.hierarchy_controller enable_log_denies = var.enable_log_denies diff --git a/modules/acm/variables.tf b/modules/acm/variables.tf index f6def5e8e..acc6644ec 100644 --- a/modules/acm/variables.tf +++ b/modules/acm/variables.tf @@ -87,12 +87,6 @@ variable "install_template_library" { default = true } -variable "skip_gcloud_download" { - description = "Whether to skip downloading gcloud (assumes gcloud and kubectl already available outside the module)" - type = bool - default = true -} - variable "source_format" { description = "Configures a non-hierarchical repo if set to 'unstructured'. Uses [ACM defaults](https://cloud.google.com/anthos-config-management/docs/how-to/installing#configuring-config-management-operator) when unset." type = string diff --git a/modules/asm/README.md b/modules/asm/README.md index 7826ea859..c9fa7a1ab 100644 --- a/modules/asm/README.md +++ b/modules/asm/README.md @@ -45,7 +45,6 @@ To deploy this config: | location | The location (zone or region) this cluster has been created in. | string | n/a | yes | | project\_id | The project in which the resource belongs. | string | n/a | yes | | service\_account\_key\_file | Path to service account key file to auth as for running `gcloud container clusters get-credentials`. | string | `""` | no | -| skip\_gcloud\_download | Whether to skip downloading gcloud (assumes gcloud and kubectl already available outside the module) | bool | `"true"` | no | ## Outputs diff --git a/modules/asm/main.tf b/modules/asm/main.tf index 7424d0ec0..1e30e4261 100644 --- a/modules/asm/main.tf +++ b/modules/asm/main.tf @@ -25,7 +25,6 @@ module "asm_install" { module_depends_on = [var.cluster_endpoint] gcloud_sdk_version = var.gcloud_sdk_version - skip_download = var.skip_gcloud_download upgrade = true additional_components = ["kubectl", "kpt", "beta", "kustomize"] cluster_name = var.cluster_name diff --git a/modules/asm/variables.tf b/modules/asm/variables.tf index 421f0fc5b..2f8af74ee 100644 --- a/modules/asm/variables.tf +++ b/modules/asm/variables.tf @@ -34,12 +34,6 @@ variable "location" { type = string } -variable "skip_gcloud_download" { - description = "Whether to skip downloading gcloud (assumes gcloud and kubectl already available outside the module)" - type = bool - default = true -} - variable "gcloud_sdk_version" { description = "The gcloud sdk version to use. Minimum required version is 293.0.0" type = string diff --git a/modules/beta-private-cluster-update-variant/README.md b/modules/beta-private-cluster-update-variant/README.md index 8dbbc599d..904916ce6 100644 --- a/modules/beta-private-cluster-update-variant/README.md +++ b/modules/beta-private-cluster-update-variant/README.md @@ -175,7 +175,6 @@ Then perform the following commands on the root folder: | firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers | list(string) | `` | no | | firewall\_priority | Priority rule for firewall rules | number | `"1000"` | no | | gce\_pd\_csi\_driver | (Beta) Whether this cluster should enable the Google Compute Engine Persistent Disk Container Storage Interface (CSI) Driver. | bool | `"false"` | no | -| gcloud\_skip\_download | Whether to skip downloading gcloud (assumes gcloud is already available outside the module) | bool | `"true"` | no | | gcloud\_upgrade | Whether to upgrade gcloud at runtime | bool | `"false"` | no | | grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer role. | bool | `"false"` | no | | horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | bool | `"true"` | no | @@ -316,6 +315,9 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog #### Terraform and Plugins - [Terraform](https://www.terraform.io/downloads.html) 0.12 - [Terraform Provider for GCP Beta][terraform-provider-google-beta] v3.41 +#### gcloud +Some submodules use the [terraform-google-gcloud](https://github.com/terraform-google-modules/terraform-google-gcloud) module. By default, this module assumes you already have gcloud installed in your $PATH. +See the [module](https://github.com/terraform-google-modules/terraform-google-gcloud#downloading) documentation for more information. ### Configure a Service Account In order to execute this module you must have a Service Account with the diff --git a/modules/beta-private-cluster-update-variant/cluster.tf b/modules/beta-private-cluster-update-variant/cluster.tf index e950f8ffb..ca0646776 100644 --- a/modules/beta-private-cluster-update-variant/cluster.tf +++ b/modules/beta-private-cluster-update-variant/cluster.tf @@ -495,8 +495,7 @@ module "gcloud_wait_for_cluster" { version = "~> 2.0.2" enabled = ! var.skip_provisioners - upgrade = var.gcloud_upgrade - skip_download = var.gcloud_skip_download + upgrade = var.gcloud_upgrade create_cmd_entrypoint = "${path.module}/scripts/wait-for-cluster.sh" create_cmd_body = "${var.project_id} ${var.name}" diff --git a/modules/beta-private-cluster-update-variant/dns.tf b/modules/beta-private-cluster-update-variant/dns.tf index 262b4a832..e0f86a819 100644 --- a/modules/beta-private-cluster-update-variant/dns.tf +++ b/modules/beta-private-cluster-update-variant/dns.tf @@ -27,7 +27,6 @@ module "gcloud_delete_default_kube_dns_configmap" { cluster_location = google_container_cluster.primary.location project_id = var.project_id upgrade = var.gcloud_upgrade - skip_download = var.gcloud_skip_download kubectl_create_command = "${path.module}/scripts/delete-default-resource.sh kube-system configmap kube-dns" diff --git a/modules/beta-private-cluster-update-variant/variables.tf b/modules/beta-private-cluster-update-variant/variables.tf index d79cdf263..2b1452adc 100644 --- a/modules/beta-private-cluster-update-variant/variables.tf +++ b/modules/beta-private-cluster-update-variant/variables.tf @@ -534,12 +534,6 @@ variable "gcloud_upgrade" { default = false } -variable "gcloud_skip_download" { - type = bool - description = "Whether to skip downloading gcloud (assumes gcloud is already available outside the module)" - default = true -} - variable "disable_default_snat" { type = bool description = "Whether to disable the default SNAT to support the private use of public IP addresses" diff --git a/modules/beta-private-cluster/README.md b/modules/beta-private-cluster/README.md index 2f823ac1b..437ef2c54 100644 --- a/modules/beta-private-cluster/README.md +++ b/modules/beta-private-cluster/README.md @@ -153,7 +153,6 @@ Then perform the following commands on the root folder: | firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers | list(string) | `` | no | | firewall\_priority | Priority rule for firewall rules | number | `"1000"` | no | | gce\_pd\_csi\_driver | (Beta) Whether this cluster should enable the Google Compute Engine Persistent Disk Container Storage Interface (CSI) Driver. | bool | `"false"` | no | -| gcloud\_skip\_download | Whether to skip downloading gcloud (assumes gcloud is already available outside the module) | bool | `"true"` | no | | gcloud\_upgrade | Whether to upgrade gcloud at runtime | bool | `"false"` | no | | grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer role. | bool | `"false"` | no | | horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | bool | `"true"` | no | @@ -294,6 +293,9 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog #### Terraform and Plugins - [Terraform](https://www.terraform.io/downloads.html) 0.12 - [Terraform Provider for GCP Beta][terraform-provider-google-beta] v3.41 +#### gcloud +Some submodules use the [terraform-google-gcloud](https://github.com/terraform-google-modules/terraform-google-gcloud) module. By default, this module assumes you already have gcloud installed in your $PATH. +See the [module](https://github.com/terraform-google-modules/terraform-google-gcloud#downloading) documentation for more information. ### Configure a Service Account In order to execute this module you must have a Service Account with the diff --git a/modules/beta-private-cluster/cluster.tf b/modules/beta-private-cluster/cluster.tf index af8d38d86..3324d25b4 100644 --- a/modules/beta-private-cluster/cluster.tf +++ b/modules/beta-private-cluster/cluster.tf @@ -422,8 +422,7 @@ module "gcloud_wait_for_cluster" { version = "~> 2.0.2" enabled = ! var.skip_provisioners - upgrade = var.gcloud_upgrade - skip_download = var.gcloud_skip_download + upgrade = var.gcloud_upgrade create_cmd_entrypoint = "${path.module}/scripts/wait-for-cluster.sh" create_cmd_body = "${var.project_id} ${var.name}" diff --git a/modules/beta-private-cluster/dns.tf b/modules/beta-private-cluster/dns.tf index 262b4a832..e0f86a819 100644 --- a/modules/beta-private-cluster/dns.tf +++ b/modules/beta-private-cluster/dns.tf @@ -27,7 +27,6 @@ module "gcloud_delete_default_kube_dns_configmap" { cluster_location = google_container_cluster.primary.location project_id = var.project_id upgrade = var.gcloud_upgrade - skip_download = var.gcloud_skip_download kubectl_create_command = "${path.module}/scripts/delete-default-resource.sh kube-system configmap kube-dns" diff --git a/modules/beta-private-cluster/variables.tf b/modules/beta-private-cluster/variables.tf index d79cdf263..2b1452adc 100644 --- a/modules/beta-private-cluster/variables.tf +++ b/modules/beta-private-cluster/variables.tf @@ -534,12 +534,6 @@ variable "gcloud_upgrade" { default = false } -variable "gcloud_skip_download" { - type = bool - description = "Whether to skip downloading gcloud (assumes gcloud is already available outside the module)" - default = true -} - variable "disable_default_snat" { type = bool description = "Whether to disable the default SNAT to support the private use of public IP addresses" diff --git a/modules/beta-public-cluster-update-variant/README.md b/modules/beta-public-cluster-update-variant/README.md index 245a3e5a1..55ccfceeb 100644 --- a/modules/beta-public-cluster-update-variant/README.md +++ b/modules/beta-public-cluster-update-variant/README.md @@ -166,7 +166,6 @@ Then perform the following commands on the root folder: | firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers | list(string) | `` | no | | firewall\_priority | Priority rule for firewall rules | number | `"1000"` | no | | gce\_pd\_csi\_driver | (Beta) Whether this cluster should enable the Google Compute Engine Persistent Disk Container Storage Interface (CSI) Driver. | bool | `"false"` | no | -| gcloud\_skip\_download | Whether to skip downloading gcloud (assumes gcloud is already available outside the module) | bool | `"true"` | no | | gcloud\_upgrade | Whether to upgrade gcloud at runtime | bool | `"false"` | no | | grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer role. | bool | `"false"` | no | | horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | bool | `"true"` | no | @@ -303,6 +302,9 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog #### Terraform and Plugins - [Terraform](https://www.terraform.io/downloads.html) 0.12 - [Terraform Provider for GCP Beta][terraform-provider-google-beta] v3.41 +#### gcloud +Some submodules use the [terraform-google-gcloud](https://github.com/terraform-google-modules/terraform-google-gcloud) module. By default, this module assumes you already have gcloud installed in your $PATH. +See the [module](https://github.com/terraform-google-modules/terraform-google-gcloud#downloading) documentation for more information. ### Configure a Service Account In order to execute this module you must have a Service Account with the diff --git a/modules/beta-public-cluster-update-variant/cluster.tf b/modules/beta-public-cluster-update-variant/cluster.tf index b1ea360ce..aa4d2ea2f 100644 --- a/modules/beta-public-cluster-update-variant/cluster.tf +++ b/modules/beta-public-cluster-update-variant/cluster.tf @@ -476,8 +476,7 @@ module "gcloud_wait_for_cluster" { version = "~> 2.0.2" enabled = ! var.skip_provisioners - upgrade = var.gcloud_upgrade - skip_download = var.gcloud_skip_download + upgrade = var.gcloud_upgrade create_cmd_entrypoint = "${path.module}/scripts/wait-for-cluster.sh" create_cmd_body = "${var.project_id} ${var.name}" diff --git a/modules/beta-public-cluster-update-variant/dns.tf b/modules/beta-public-cluster-update-variant/dns.tf index 262b4a832..e0f86a819 100644 --- a/modules/beta-public-cluster-update-variant/dns.tf +++ b/modules/beta-public-cluster-update-variant/dns.tf @@ -27,7 +27,6 @@ module "gcloud_delete_default_kube_dns_configmap" { cluster_location = google_container_cluster.primary.location project_id = var.project_id upgrade = var.gcloud_upgrade - skip_download = var.gcloud_skip_download kubectl_create_command = "${path.module}/scripts/delete-default-resource.sh kube-system configmap kube-dns" diff --git a/modules/beta-public-cluster-update-variant/variables.tf b/modules/beta-public-cluster-update-variant/variables.tf index 72cd76365..00393835b 100644 --- a/modules/beta-public-cluster-update-variant/variables.tf +++ b/modules/beta-public-cluster-update-variant/variables.tf @@ -503,12 +503,6 @@ variable "gcloud_upgrade" { default = false } -variable "gcloud_skip_download" { - type = bool - description = "Whether to skip downloading gcloud (assumes gcloud is already available outside the module)" - default = true -} - variable "disable_default_snat" { type = bool description = "Whether to disable the default SNAT to support the private use of public IP addresses" diff --git a/modules/beta-public-cluster/README.md b/modules/beta-public-cluster/README.md index 39e92f081..fa536eeed 100644 --- a/modules/beta-public-cluster/README.md +++ b/modules/beta-public-cluster/README.md @@ -144,7 +144,6 @@ Then perform the following commands on the root folder: | firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers | list(string) | `` | no | | firewall\_priority | Priority rule for firewall rules | number | `"1000"` | no | | gce\_pd\_csi\_driver | (Beta) Whether this cluster should enable the Google Compute Engine Persistent Disk Container Storage Interface (CSI) Driver. | bool | `"false"` | no | -| gcloud\_skip\_download | Whether to skip downloading gcloud (assumes gcloud is already available outside the module) | bool | `"true"` | no | | gcloud\_upgrade | Whether to upgrade gcloud at runtime | bool | `"false"` | no | | grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer role. | bool | `"false"` | no | | horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | bool | `"true"` | no | @@ -281,6 +280,9 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog #### Terraform and Plugins - [Terraform](https://www.terraform.io/downloads.html) 0.12 - [Terraform Provider for GCP Beta][terraform-provider-google-beta] v3.41 +#### gcloud +Some submodules use the [terraform-google-gcloud](https://github.com/terraform-google-modules/terraform-google-gcloud) module. By default, this module assumes you already have gcloud installed in your $PATH. +See the [module](https://github.com/terraform-google-modules/terraform-google-gcloud#downloading) documentation for more information. ### Configure a Service Account In order to execute this module you must have a Service Account with the diff --git a/modules/beta-public-cluster/cluster.tf b/modules/beta-public-cluster/cluster.tf index 53139785b..0391c1afe 100644 --- a/modules/beta-public-cluster/cluster.tf +++ b/modules/beta-public-cluster/cluster.tf @@ -403,8 +403,7 @@ module "gcloud_wait_for_cluster" { version = "~> 2.0.2" enabled = ! var.skip_provisioners - upgrade = var.gcloud_upgrade - skip_download = var.gcloud_skip_download + upgrade = var.gcloud_upgrade create_cmd_entrypoint = "${path.module}/scripts/wait-for-cluster.sh" create_cmd_body = "${var.project_id} ${var.name}" diff --git a/modules/beta-public-cluster/dns.tf b/modules/beta-public-cluster/dns.tf index 262b4a832..e0f86a819 100644 --- a/modules/beta-public-cluster/dns.tf +++ b/modules/beta-public-cluster/dns.tf @@ -27,7 +27,6 @@ module "gcloud_delete_default_kube_dns_configmap" { cluster_location = google_container_cluster.primary.location project_id = var.project_id upgrade = var.gcloud_upgrade - skip_download = var.gcloud_skip_download kubectl_create_command = "${path.module}/scripts/delete-default-resource.sh kube-system configmap kube-dns" diff --git a/modules/beta-public-cluster/variables.tf b/modules/beta-public-cluster/variables.tf index 72cd76365..00393835b 100644 --- a/modules/beta-public-cluster/variables.tf +++ b/modules/beta-public-cluster/variables.tf @@ -503,12 +503,6 @@ variable "gcloud_upgrade" { default = false } -variable "gcloud_skip_download" { - type = bool - description = "Whether to skip downloading gcloud (assumes gcloud is already available outside the module)" - default = true -} - variable "disable_default_snat" { type = bool description = "Whether to disable the default SNAT to support the private use of public IP addresses" diff --git a/modules/config-sync/README.md b/modules/config-sync/README.md index 7a8101895..3463ff6da 100644 --- a/modules/config-sync/README.md +++ b/modules/config-sync/README.md @@ -56,7 +56,6 @@ To deploy this config: | policy\_dir | Subfolder containing configs in ACM Git repo. If un-set, uses Config Management default. | string | `""` | no | | project\_id | GCP project_id used to reach cluster. | string | n/a | yes | | secret\_type | credential secret type, passed through to ConfigManagement spec.git.secretType. Overriden to value 'ssh' if `create_ssh_key` is true | string | n/a | yes | -| skip\_gcloud\_download | Whether to skip downloading gcloud (assumes gcloud and kubectl already available outside the module) | bool | `"true"` | no | | source\_format | Configures a non-hierarchical repo if set to 'unstructured'. Uses [Config Sync defaults](https://cloud.google.com/kubernetes-engine/docs/add-on/config-sync/how-to/installing#configuring-config-management-operator) when unset. | string | `""` | no | | ssh\_auth\_key | Key for Git authentication. Overrides 'create_ssh_key' variable. Can be set using 'file(path/to/file)'-function. | string | `"null"` | no | | sync\_branch | ACM repo Git branch. If un-set, uses Config Management default. | string | `""` | no | diff --git a/modules/config-sync/main.tf b/modules/config-sync/main.tf index b0bfc2f59..c4f2c23f0 100644 --- a/modules/config-sync/main.tf +++ b/modules/config-sync/main.tf @@ -29,7 +29,6 @@ module "configsync_operator" { create_ssh_key = var.create_ssh_key secret_type = var.secret_type ssh_auth_key = var.ssh_auth_key - skip_gcloud_download = var.skip_gcloud_download source_format = var.source_format hierarchy_controller = var.hierarchy_controller diff --git a/modules/config-sync/variables.tf b/modules/config-sync/variables.tf index 663fdcd8a..b740d6480 100644 --- a/modules/config-sync/variables.tf +++ b/modules/config-sync/variables.tf @@ -74,12 +74,6 @@ variable "ssh_auth_key" { default = null } -variable "skip_gcloud_download" { - description = "Whether to skip downloading gcloud (assumes gcloud and kubectl already available outside the module)" - type = bool - default = true -} - variable "source_format" { description = "Configures a non-hierarchical repo if set to 'unstructured'. Uses [Config Sync defaults](https://cloud.google.com/kubernetes-engine/docs/add-on/config-sync/how-to/installing#configuring-config-management-operator) when unset." type = string diff --git a/modules/hub/README.md b/modules/hub/README.md index 3bd8620c6..2482670ce 100644 --- a/modules/hub/README.md +++ b/modules/hub/README.md @@ -43,7 +43,6 @@ To deploy this config: | module\_depends\_on | List of modules or resources this module depends on. | list | `` | no | | project\_id | The project in which the resource belongs. | string | n/a | yes | | sa\_private\_key | Private key for service account base64 encoded. Required only if `use_existing_sa` is set to `true`. | string | `"null"` | no | -| skip\_gcloud\_download | Whether to skip downloading gcloud (assumes gcloud and kubectl already available outside the module) | bool | `"true"` | no | | use\_existing\_sa | Uses an existing service account to register membership. Requires sa_private_key | bool | `"false"` | no | | use\_tf\_google\_credentials\_env\_var | Optional GOOGLE_CREDENTIALS environment variable to be activated. | bool | `"false"` | no | diff --git a/modules/hub/main.tf b/modules/hub/main.tf index 30b73774d..1c92d2a83 100644 --- a/modules/hub/main.tf +++ b/modules/hub/main.tf @@ -46,7 +46,6 @@ module "gke_hub_registration" { platform = "linux" gcloud_sdk_version = var.gcloud_sdk_version - skip_download = var.skip_gcloud_download upgrade = true use_tf_google_credentials_env_var = var.use_tf_google_credentials_env_var module_depends_on = concat([var.cluster_endpoint], var.module_depends_on) diff --git a/modules/hub/variables.tf b/modules/hub/variables.tf index 4fdf08a28..017557011 100644 --- a/modules/hub/variables.tf +++ b/modules/hub/variables.tf @@ -34,12 +34,6 @@ variable "location" { type = string } -variable "skip_gcloud_download" { - description = "Whether to skip downloading gcloud (assumes gcloud and kubectl already available outside the module)" - type = bool - default = true -} - variable "use_tf_google_credentials_env_var" { description = "Optional GOOGLE_CREDENTIALS environment variable to be activated." type = bool diff --git a/modules/k8s-operator-crd-support/main.tf b/modules/k8s-operator-crd-support/main.tf index 7178a4829..334b0d23b 100644 --- a/modules/k8s-operator-crd-support/main.tf +++ b/modules/k8s-operator-crd-support/main.tf @@ -27,10 +27,9 @@ locals { } module "k8sop_manifest" { - source = "terraform-google-modules/gcloud/google" - version = "~> 2.0.2" - enabled = local.should_download_manifest - skip_download = var.skip_gcloud_download + source = "terraform-google-modules/gcloud/google" + version = "~> 2.0.2" + enabled = local.should_download_manifest create_cmd_entrypoint = "gsutil" create_cmd_body = "cp ${var.operator_latest_manifest_url} ${local.manifest_path}" @@ -43,7 +42,6 @@ module "k8s_operator" { source = "terraform-google-modules/gcloud/google//modules/kubectl-wrapper" version = "~> 2.0.2" module_depends_on = [module.k8sop_manifest.wait, var.cluster_endpoint] - skip_download = var.skip_gcloud_download cluster_name = var.cluster_name cluster_location = var.location project_id = var.project_id @@ -66,7 +64,6 @@ module "k8sop_creds_secret" { enabled = var.create_ssh_key == true || var.ssh_auth_key != null ? "true" : "false" module_depends_on = [module.k8s_operator.wait] - skip_download = var.skip_gcloud_download cluster_name = var.cluster_name cluster_location = var.location project_id = var.project_id @@ -103,7 +100,6 @@ module "k8sop_config" { source = "terraform-google-modules/gcloud/google//modules/kubectl-wrapper" version = "~> 2.0.2" module_depends_on = [module.k8s_operator.wait, module.k8sop_creds_secret.wait] - skip_download = var.skip_gcloud_download cluster_name = var.cluster_name cluster_location = var.location project_id = var.project_id @@ -119,7 +115,6 @@ module "wait_for_gatekeeper" { version = "~> 2.0.2" enabled = var.enable_policy_controller ? true : false module_depends_on = [module.k8sop_config.wait] - skip_download = var.skip_gcloud_download cluster_name = var.cluster_name cluster_location = var.location project_id = var.project_id diff --git a/modules/k8s-operator-crd-support/variables.tf b/modules/k8s-operator-crd-support/variables.tf index 2e838526d..431ae9ee7 100644 --- a/modules/k8s-operator-crd-support/variables.tf +++ b/modules/k8s-operator-crd-support/variables.tf @@ -105,12 +105,6 @@ variable "operator_cr_template_path" { type = string } -variable "skip_gcloud_download" { - description = "Whether to skip downloading gcloud (assumes gcloud and kubectl already available outside the module)" - type = bool - default = true -} - variable "source_format" { description = <` | no | | firewall\_priority | Priority rule for firewall rules | number | `"1000"` | no | -| gcloud\_skip\_download | Whether to skip downloading gcloud (assumes gcloud is already available outside the module) | bool | `"true"` | no | | gcloud\_upgrade | Whether to upgrade gcloud at runtime | bool | `"false"` | no | | grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer role. | bool | `"false"` | no | | horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | bool | `"true"` | no | @@ -286,6 +285,9 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog #### Terraform and Plugins - [Terraform](https://www.terraform.io/downloads.html) 0.12 - [Terraform Provider for GCP][terraform-provider-google] v3.41 +#### gcloud +Some submodules use the [terraform-google-gcloud](https://github.com/terraform-google-modules/terraform-google-gcloud) module. By default, this module assumes you already have gcloud installed in your $PATH. +See the [module](https://github.com/terraform-google-modules/terraform-google-gcloud#downloading) documentation for more information. ### Configure a Service Account In order to execute this module you must have a Service Account with the diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index 3bfc09c8d..9b6e69b1b 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -407,8 +407,7 @@ module "gcloud_wait_for_cluster" { version = "~> 2.0.2" enabled = ! var.skip_provisioners - upgrade = var.gcloud_upgrade - skip_download = var.gcloud_skip_download + upgrade = var.gcloud_upgrade create_cmd_entrypoint = "${path.module}/scripts/wait-for-cluster.sh" create_cmd_body = "${var.project_id} ${var.name}" diff --git a/modules/private-cluster-update-variant/dns.tf b/modules/private-cluster-update-variant/dns.tf index 262b4a832..e0f86a819 100644 --- a/modules/private-cluster-update-variant/dns.tf +++ b/modules/private-cluster-update-variant/dns.tf @@ -27,7 +27,6 @@ module "gcloud_delete_default_kube_dns_configmap" { cluster_location = google_container_cluster.primary.location project_id = var.project_id upgrade = var.gcloud_upgrade - skip_download = var.gcloud_skip_download kubectl_create_command = "${path.module}/scripts/delete-default-resource.sh kube-system configmap kube-dns" diff --git a/modules/private-cluster-update-variant/variables.tf b/modules/private-cluster-update-variant/variables.tf index ca88ece9b..2c9f1b6bc 100644 --- a/modules/private-cluster-update-variant/variables.tf +++ b/modules/private-cluster-update-variant/variables.tf @@ -437,9 +437,3 @@ variable "gcloud_upgrade" { default = false } -variable "gcloud_skip_download" { - type = bool - description = "Whether to skip downloading gcloud (assumes gcloud is already available outside the module)" - default = true -} - diff --git a/modules/private-cluster/README.md b/modules/private-cluster/README.md index 2d8d7e605..ab0245df9 100644 --- a/modules/private-cluster/README.md +++ b/modules/private-cluster/README.md @@ -140,7 +140,6 @@ Then perform the following commands on the root folder: | enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster | bool | `"true"` | no | | firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers | list(string) | `` | no | | firewall\_priority | Priority rule for firewall rules | number | `"1000"` | no | -| gcloud\_skip\_download | Whether to skip downloading gcloud (assumes gcloud is already available outside the module) | bool | `"true"` | no | | gcloud\_upgrade | Whether to upgrade gcloud at runtime | bool | `"false"` | no | | grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer role. | bool | `"false"` | no | | horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | bool | `"true"` | no | @@ -264,6 +263,9 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog #### Terraform and Plugins - [Terraform](https://www.terraform.io/downloads.html) 0.12 - [Terraform Provider for GCP][terraform-provider-google] v3.41 +#### gcloud +Some submodules use the [terraform-google-gcloud](https://github.com/terraform-google-modules/terraform-google-gcloud) module. By default, this module assumes you already have gcloud installed in your $PATH. +See the [module](https://github.com/terraform-google-modules/terraform-google-gcloud#downloading) documentation for more information. ### Configure a Service Account In order to execute this module you must have a Service Account with the diff --git a/modules/private-cluster/cluster.tf b/modules/private-cluster/cluster.tf index 5ddbea5b9..e61ad00d7 100644 --- a/modules/private-cluster/cluster.tf +++ b/modules/private-cluster/cluster.tf @@ -334,8 +334,7 @@ module "gcloud_wait_for_cluster" { version = "~> 2.0.2" enabled = ! var.skip_provisioners - upgrade = var.gcloud_upgrade - skip_download = var.gcloud_skip_download + upgrade = var.gcloud_upgrade create_cmd_entrypoint = "${path.module}/scripts/wait-for-cluster.sh" create_cmd_body = "${var.project_id} ${var.name}" diff --git a/modules/private-cluster/dns.tf b/modules/private-cluster/dns.tf index 262b4a832..e0f86a819 100644 --- a/modules/private-cluster/dns.tf +++ b/modules/private-cluster/dns.tf @@ -27,7 +27,6 @@ module "gcloud_delete_default_kube_dns_configmap" { cluster_location = google_container_cluster.primary.location project_id = var.project_id upgrade = var.gcloud_upgrade - skip_download = var.gcloud_skip_download kubectl_create_command = "${path.module}/scripts/delete-default-resource.sh kube-system configmap kube-dns" diff --git a/modules/private-cluster/variables.tf b/modules/private-cluster/variables.tf index ca88ece9b..2c9f1b6bc 100644 --- a/modules/private-cluster/variables.tf +++ b/modules/private-cluster/variables.tf @@ -437,9 +437,3 @@ variable "gcloud_upgrade" { default = false } -variable "gcloud_skip_download" { - type = bool - description = "Whether to skip downloading gcloud (assumes gcloud is already available outside the module)" - default = true -} - diff --git a/variables.tf b/variables.tf index 9804cb2b7..6e3a8bf5c 100644 --- a/variables.tf +++ b/variables.tf @@ -413,9 +413,3 @@ variable "gcloud_upgrade" { default = false } -variable "gcloud_skip_download" { - type = bool - description = "Whether to skip downloading gcloud (assumes gcloud is already available outside the module)" - default = true -} -