From 687dc719b0596c892b4143656fea7570da90f372 Mon Sep 17 00:00:00 2001 From: sig-bhutwala Date: Thu, 29 Apr 2021 17:19:46 -0400 Subject: [PATCH] fix: Remove data google_client_config from all modules as it is no longer used within modules (#875) * remove data google_client_config from all modules as it is no longer used within modules * remove all auth files marked by autogen * remove what I think is unnecessary dependencies on data field --- auth.tf | 24 ---------------- autogen/main/auth.tf.tmpl | 28 ------------------- autogen/main/dns.tf.tmpl | 4 --- autogen/main/masq.tf.tmpl | 1 - dns.tf | 4 --- masq.tf | 1 - .../auth.tf | 24 ---------------- .../dns.tf | 4 --- .../masq.tf | 1 - modules/beta-private-cluster/auth.tf | 24 ---------------- modules/beta-private-cluster/dns.tf | 4 --- modules/beta-private-cluster/masq.tf | 1 - .../auth.tf | 24 ---------------- .../beta-public-cluster-update-variant/dns.tf | 4 --- .../masq.tf | 1 - modules/beta-public-cluster/auth.tf | 24 ---------------- modules/beta-public-cluster/dns.tf | 4 --- modules/beta-public-cluster/masq.tf | 1 - .../private-cluster-update-variant/auth.tf | 24 ---------------- modules/private-cluster-update-variant/dns.tf | 4 --- .../private-cluster-update-variant/masq.tf | 1 - modules/private-cluster/auth.tf | 24 ---------------- modules/private-cluster/dns.tf | 4 --- modules/private-cluster/masq.tf | 1 - 24 files changed, 236 deletions(-) delete mode 100644 auth.tf delete mode 100644 autogen/main/auth.tf.tmpl delete mode 100644 modules/beta-private-cluster-update-variant/auth.tf delete mode 100644 modules/beta-private-cluster/auth.tf delete mode 100644 modules/beta-public-cluster-update-variant/auth.tf delete mode 100644 modules/beta-public-cluster/auth.tf delete mode 100644 modules/private-cluster-update-variant/auth.tf delete mode 100644 modules/private-cluster/auth.tf diff --git a/auth.tf b/auth.tf deleted file mode 100644 index c91464b36..000000000 --- a/auth.tf +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright 2018 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file was automatically generated from a template in ./autogen/main - -/****************************************** - Retrieve authentication token - *****************************************/ -data "google_client_config" "default" { - provider = google -} diff --git a/autogen/main/auth.tf.tmpl b/autogen/main/auth.tf.tmpl deleted file mode 100644 index 41a3e0b86..000000000 --- a/autogen/main/auth.tf.tmpl +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright 2018 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -{{ autogeneration_note }} - -/****************************************** - Retrieve authentication token - *****************************************/ -data "google_client_config" "default" { - {% if beta_cluster %} - provider = google-beta - {% else %} - provider = google - {% endif %} -} diff --git a/autogen/main/dns.tf.tmpl b/autogen/main/dns.tf.tmpl index a7251ec7b..a63df04ef 100644 --- a/autogen/main/dns.tf.tmpl +++ b/autogen/main/dns.tf.tmpl @@ -33,7 +33,6 @@ module "gcloud_delete_default_kube_dns_configmap" { kubectl_destroy_command = "" module_depends_on = concat( - [data.google_client_config.default.access_token], [google_container_cluster.primary.master_version], [for pool in google_container_node_pool.pools : pool.name] ) @@ -62,7 +61,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] @@ -89,7 +87,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] @@ -119,7 +116,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] diff --git a/autogen/main/masq.tf.tmpl b/autogen/main/masq.tf.tmpl index 6deab757c..8eaa6689d 100644 --- a/autogen/main/masq.tf.tmpl +++ b/autogen/main/masq.tf.tmpl @@ -41,7 +41,6 @@ EOF } depends_on = [ - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] diff --git a/dns.tf b/dns.tf index e0f86a819..76a73f14e 100644 --- a/dns.tf +++ b/dns.tf @@ -33,7 +33,6 @@ module "gcloud_delete_default_kube_dns_configmap" { kubectl_destroy_command = "" module_depends_on = concat( - [data.google_client_config.default.access_token], [google_container_cluster.primary.master_version], [for pool in google_container_node_pool.pools : pool.name] ) @@ -62,7 +61,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] @@ -89,7 +87,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] @@ -119,7 +116,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] diff --git a/masq.tf b/masq.tf index 3b1cc8026..2c4597599 100644 --- a/masq.tf +++ b/masq.tf @@ -41,7 +41,6 @@ EOF } depends_on = [ - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] diff --git a/modules/beta-private-cluster-update-variant/auth.tf b/modules/beta-private-cluster-update-variant/auth.tf deleted file mode 100644 index 8e582145f..000000000 --- a/modules/beta-private-cluster-update-variant/auth.tf +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright 2018 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file was automatically generated from a template in ./autogen/main - -/****************************************** - Retrieve authentication token - *****************************************/ -data "google_client_config" "default" { - provider = google-beta -} diff --git a/modules/beta-private-cluster-update-variant/dns.tf b/modules/beta-private-cluster-update-variant/dns.tf index e0f86a819..76a73f14e 100644 --- a/modules/beta-private-cluster-update-variant/dns.tf +++ b/modules/beta-private-cluster-update-variant/dns.tf @@ -33,7 +33,6 @@ module "gcloud_delete_default_kube_dns_configmap" { kubectl_destroy_command = "" module_depends_on = concat( - [data.google_client_config.default.access_token], [google_container_cluster.primary.master_version], [for pool in google_container_node_pool.pools : pool.name] ) @@ -62,7 +61,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] @@ -89,7 +87,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] @@ -119,7 +116,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] diff --git a/modules/beta-private-cluster-update-variant/masq.tf b/modules/beta-private-cluster-update-variant/masq.tf index 3b1cc8026..2c4597599 100644 --- a/modules/beta-private-cluster-update-variant/masq.tf +++ b/modules/beta-private-cluster-update-variant/masq.tf @@ -41,7 +41,6 @@ EOF } depends_on = [ - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] diff --git a/modules/beta-private-cluster/auth.tf b/modules/beta-private-cluster/auth.tf deleted file mode 100644 index 8e582145f..000000000 --- a/modules/beta-private-cluster/auth.tf +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright 2018 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file was automatically generated from a template in ./autogen/main - -/****************************************** - Retrieve authentication token - *****************************************/ -data "google_client_config" "default" { - provider = google-beta -} diff --git a/modules/beta-private-cluster/dns.tf b/modules/beta-private-cluster/dns.tf index e0f86a819..76a73f14e 100644 --- a/modules/beta-private-cluster/dns.tf +++ b/modules/beta-private-cluster/dns.tf @@ -33,7 +33,6 @@ module "gcloud_delete_default_kube_dns_configmap" { kubectl_destroy_command = "" module_depends_on = concat( - [data.google_client_config.default.access_token], [google_container_cluster.primary.master_version], [for pool in google_container_node_pool.pools : pool.name] ) @@ -62,7 +61,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] @@ -89,7 +87,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] @@ -119,7 +116,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] diff --git a/modules/beta-private-cluster/masq.tf b/modules/beta-private-cluster/masq.tf index 3b1cc8026..2c4597599 100644 --- a/modules/beta-private-cluster/masq.tf +++ b/modules/beta-private-cluster/masq.tf @@ -41,7 +41,6 @@ EOF } depends_on = [ - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] diff --git a/modules/beta-public-cluster-update-variant/auth.tf b/modules/beta-public-cluster-update-variant/auth.tf deleted file mode 100644 index 8e582145f..000000000 --- a/modules/beta-public-cluster-update-variant/auth.tf +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright 2018 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file was automatically generated from a template in ./autogen/main - -/****************************************** - Retrieve authentication token - *****************************************/ -data "google_client_config" "default" { - provider = google-beta -} diff --git a/modules/beta-public-cluster-update-variant/dns.tf b/modules/beta-public-cluster-update-variant/dns.tf index e0f86a819..76a73f14e 100644 --- a/modules/beta-public-cluster-update-variant/dns.tf +++ b/modules/beta-public-cluster-update-variant/dns.tf @@ -33,7 +33,6 @@ module "gcloud_delete_default_kube_dns_configmap" { kubectl_destroy_command = "" module_depends_on = concat( - [data.google_client_config.default.access_token], [google_container_cluster.primary.master_version], [for pool in google_container_node_pool.pools : pool.name] ) @@ -62,7 +61,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] @@ -89,7 +87,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] @@ -119,7 +116,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] diff --git a/modules/beta-public-cluster-update-variant/masq.tf b/modules/beta-public-cluster-update-variant/masq.tf index 3b1cc8026..2c4597599 100644 --- a/modules/beta-public-cluster-update-variant/masq.tf +++ b/modules/beta-public-cluster-update-variant/masq.tf @@ -41,7 +41,6 @@ EOF } depends_on = [ - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] diff --git a/modules/beta-public-cluster/auth.tf b/modules/beta-public-cluster/auth.tf deleted file mode 100644 index 8e582145f..000000000 --- a/modules/beta-public-cluster/auth.tf +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright 2018 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file was automatically generated from a template in ./autogen/main - -/****************************************** - Retrieve authentication token - *****************************************/ -data "google_client_config" "default" { - provider = google-beta -} diff --git a/modules/beta-public-cluster/dns.tf b/modules/beta-public-cluster/dns.tf index e0f86a819..76a73f14e 100644 --- a/modules/beta-public-cluster/dns.tf +++ b/modules/beta-public-cluster/dns.tf @@ -33,7 +33,6 @@ module "gcloud_delete_default_kube_dns_configmap" { kubectl_destroy_command = "" module_depends_on = concat( - [data.google_client_config.default.access_token], [google_container_cluster.primary.master_version], [for pool in google_container_node_pool.pools : pool.name] ) @@ -62,7 +61,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] @@ -89,7 +87,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] @@ -119,7 +116,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] diff --git a/modules/beta-public-cluster/masq.tf b/modules/beta-public-cluster/masq.tf index 3b1cc8026..2c4597599 100644 --- a/modules/beta-public-cluster/masq.tf +++ b/modules/beta-public-cluster/masq.tf @@ -41,7 +41,6 @@ EOF } depends_on = [ - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] diff --git a/modules/private-cluster-update-variant/auth.tf b/modules/private-cluster-update-variant/auth.tf deleted file mode 100644 index c91464b36..000000000 --- a/modules/private-cluster-update-variant/auth.tf +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright 2018 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file was automatically generated from a template in ./autogen/main - -/****************************************** - Retrieve authentication token - *****************************************/ -data "google_client_config" "default" { - provider = google -} diff --git a/modules/private-cluster-update-variant/dns.tf b/modules/private-cluster-update-variant/dns.tf index e0f86a819..76a73f14e 100644 --- a/modules/private-cluster-update-variant/dns.tf +++ b/modules/private-cluster-update-variant/dns.tf @@ -33,7 +33,6 @@ module "gcloud_delete_default_kube_dns_configmap" { kubectl_destroy_command = "" module_depends_on = concat( - [data.google_client_config.default.access_token], [google_container_cluster.primary.master_version], [for pool in google_container_node_pool.pools : pool.name] ) @@ -62,7 +61,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] @@ -89,7 +87,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] @@ -119,7 +116,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] diff --git a/modules/private-cluster-update-variant/masq.tf b/modules/private-cluster-update-variant/masq.tf index 3b1cc8026..2c4597599 100644 --- a/modules/private-cluster-update-variant/masq.tf +++ b/modules/private-cluster-update-variant/masq.tf @@ -41,7 +41,6 @@ EOF } depends_on = [ - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] diff --git a/modules/private-cluster/auth.tf b/modules/private-cluster/auth.tf deleted file mode 100644 index c91464b36..000000000 --- a/modules/private-cluster/auth.tf +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright 2018 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file was automatically generated from a template in ./autogen/main - -/****************************************** - Retrieve authentication token - *****************************************/ -data "google_client_config" "default" { - provider = google -} diff --git a/modules/private-cluster/dns.tf b/modules/private-cluster/dns.tf index e0f86a819..76a73f14e 100644 --- a/modules/private-cluster/dns.tf +++ b/modules/private-cluster/dns.tf @@ -33,7 +33,6 @@ module "gcloud_delete_default_kube_dns_configmap" { kubectl_destroy_command = "" module_depends_on = concat( - [data.google_client_config.default.access_token], [google_container_cluster.primary.master_version], [for pool in google_container_node_pool.pools : pool.name] ) @@ -62,7 +61,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] @@ -89,7 +87,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] @@ -119,7 +116,6 @@ EOF depends_on = [ module.gcloud_delete_default_kube_dns_configmap.wait, - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ] diff --git a/modules/private-cluster/masq.tf b/modules/private-cluster/masq.tf index 3b1cc8026..2c4597599 100644 --- a/modules/private-cluster/masq.tf +++ b/modules/private-cluster/masq.tf @@ -41,7 +41,6 @@ EOF } depends_on = [ - data.google_client_config.default, google_container_cluster.primary, google_container_node_pool.pools, ]