Skip to content

Commit c398144

Browse files
authored
fix: Revert attribution fix (#845)
* revert: Fix attribution for safer cluster modules (#830) * update to 14.0 * temporarily test with 0.14x tf image in ci * bump setup pf versions * bump setup provider * fix setup pf * kitchen fix for 0.14 * bump networking * bump iap example * switch back to 0.13 tests * fmt
1 parent 25cf367 commit c398144

File tree

39 files changed

+36
-164
lines changed

39 files changed

+36
-164
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ Then perform the following commands on the root folder:
123123

124124
| Name | Description | Type | Default | Required |
125125
|------|-------------|------|---------|:--------:|
126-
| \_parent\_module | (Internal) Parent module which should be referenced in API calls. | `string` | `""` | no |
127126
| add\_cluster\_firewall\_rules | Create additional firewall rules | `bool` | `false` | no |
128127
| add\_shadow\_firewall\_rules | Create GKE shadow firewall (the same as default firewall rules with firewall logs enabled). | `bool` | `false` | no |
129128
| basic\_auth\_password | The password to be used with Basic Authentication. | `string` | `""` | no |

autogen/main/variables.tf.tmpl

-6
Original file line numberDiff line numberDiff line change
@@ -626,9 +626,3 @@ variable "enable_tpu" {
626626
default = false
627627
}
628628
{% endif %}
629-
630-
variable "_parent_module" {
631-
type = string
632-
description = "(Internal) Parent module which should be referenced in API calls."
633-
default = ""
634-
}

autogen/main/versions.tf.tmpl

+2-6
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
{% set module_path_str = module_path|string %}
1818
{% set module_registry_name = module_path_str.split('/')[-1] %}
1919

20-
locals {
21-
blueprint_name = join("/", compact([var._parent_module, "terraform-google-kubernetes-engine{% if module_registry_name %}:{{ module_registry_name }}{% endif %}/v14.0.0"]))
22-
}
23-
2420
terraform {
2521
required_version = ">=0.13"
2622

@@ -36,7 +32,7 @@ terraform {
3632
}
3733
}
3834
provider_meta "google-beta" {
39-
module_name = "blueprints/terraform/${local.blueprint_name}"
35+
module_name = "blueprints/terraform/terraform-google-kubernetes-engine{% if module_registry_name %}:{{ module_registry_name }}{% endif %}/v14.0.0"
4036
}
4137
{% else %}
4238
required_providers {
@@ -50,7 +46,7 @@ terraform {
5046
}
5147
}
5248
provider_meta "google" {
53-
module_name = "blueprints/terraform/${local.blueprint_name}"
49+
module_name = "blueprints/terraform/terraform-google-kubernetes-engine{% if module_registry_name %}:{{ module_registry_name }}{% endif %}/v14.0.0"
5450
}
5551
{% endif %}
5652
}

autogen/safer-cluster/main.tf.tmpl

-2
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,4 @@ module "gke" {
168168
gce_pd_csi_driver = var.gce_pd_csi_driver
169169

170170
notification_config_topic = var.notification_config_topic
171-
172-
_parent_module = local.blueprint_name
173171
}

autogen/safer-cluster/variables.tf.tmpl

-6
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,3 @@ variable "notification_config_topic" {
375375
description = "The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}."
376376
default = ""
377377
}
378-
379-
variable "_parent_module" {
380-
type = string
381-
description = "(Internal) Parent module which should be referenced in API calls."
382-
default = ""
383-
}

autogen/safer-cluster/versions.tf.tmpl

+1-5
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,10 @@
1919
{% set module_path_str = module_path|string %}
2020
{% set module_registry_name = module_path_str.split('/')[-1] %}
2121

22-
locals {
23-
blueprint_name = join("/", compact([var._parent_module, "terraform-google-kubernetes-engine{% if module_registry_name %}:{{ module_registry_name }}{% endif %}/v14.0.0"]))
24-
}
25-
2622
terraform {
2723
required_version = ">=0.13"
2824

2925
provider_meta "google-beta" {
30-
module_name = "blueprints/terraform/${local.blueprint_name}"
26+
module_name = "blueprints/terraform/terraform-google-kubernetes-engine{% if module_registry_name %}:{{ module_registry_name }}{% endif %}/v14.0.0"
3127
}
3228
}

examples/private_zonal_with_networking/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ provider "kubernetes" {
2525

2626
module "gcp-network" {
2727
source = "terraform-google-modules/network/google"
28-
version = "~> 2.5"
28+
version = "~> 3.1"
2929
project_id = var.project_id
3030
network_name = var.network
3131

examples/safer_cluster_iap_bastion/bastion.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ data "template_file" "startup_script" {
2828

2929
module "bastion" {
3030
source = "terraform-google-modules/bastion-host/google"
31-
version = "~> 2.0"
31+
version = "~> 3.0"
3232
network = module.vpc.network_self_link
3333
subnet = module.vpc.subnets_self_links[0]
3434
project = module.enabled_google_apis.project_id

examples/simple_regional_with_networking/main.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
provider "google" {
18-
version = "~> 3.42.0"
18+
version = "~> 3.45.0"
1919
}
2020

2121
data "google_client_config" "default" {}
@@ -29,7 +29,7 @@ provider "kubernetes" {
2929

3030
module "gcp-network" {
3131
source = "terraform-google-modules/network/google"
32-
version = "~> 2.5"
32+
version = "~> 3.1"
3333
project_id = var.project_id
3434
network_name = var.network
3535

modules/beta-private-cluster-update-variant/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ Then perform the following commands on the root folder:
154154

155155
| Name | Description | Type | Default | Required |
156156
|------|-------------|------|---------|:--------:|
157-
| \_parent\_module | (Internal) Parent module which should be referenced in API calls. | `string` | `""` | no |
158157
| add\_cluster\_firewall\_rules | Create additional firewall rules | `bool` | `false` | no |
159158
| add\_shadow\_firewall\_rules | Create GKE shadow firewall (the same as default firewall rules with firewall logs enabled). | `bool` | `false` | no |
160159
| authenticator\_security\_group | The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format [email protected] | `string` | `null` | no |

modules/beta-private-cluster-update-variant/variables.tf

-6
Original file line numberDiff line numberDiff line change
@@ -602,9 +602,3 @@ variable "enable_tpu" {
602602
description = "Enable Cloud TPU resources in the cluster. WARNING: changing this after cluster creation is destructive!"
603603
default = false
604604
}
605-
606-
variable "_parent_module" {
607-
type = string
608-
description = "(Internal) Parent module which should be referenced in API calls."
609-
default = ""
610-
}

modules/beta-private-cluster-update-variant/versions.tf

+1-5
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
*/
1616

1717

18-
locals {
19-
blueprint_name = join("/", compact([var._parent_module, "terraform-google-kubernetes-engine:beta-private-cluster-update-variant/v14.0.0"]))
20-
}
21-
2218
terraform {
2319
required_version = ">=0.13"
2420

@@ -33,6 +29,6 @@ terraform {
3329
}
3430
}
3531
provider_meta "google-beta" {
36-
module_name = "blueprints/terraform/${local.blueprint_name}"
32+
module_name = "blueprints/terraform/terraform-google-kubernetes-engine:beta-private-cluster-update-variant/v14.0.0"
3733
}
3834
}

modules/beta-private-cluster/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ Then perform the following commands on the root folder:
132132

133133
| Name | Description | Type | Default | Required |
134134
|------|-------------|------|---------|:--------:|
135-
| \_parent\_module | (Internal) Parent module which should be referenced in API calls. | `string` | `""` | no |
136135
| add\_cluster\_firewall\_rules | Create additional firewall rules | `bool` | `false` | no |
137136
| add\_shadow\_firewall\_rules | Create GKE shadow firewall (the same as default firewall rules with firewall logs enabled). | `bool` | `false` | no |
138137
| authenticator\_security\_group | The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format [email protected] | `string` | `null` | no |

modules/beta-private-cluster/variables.tf

-6
Original file line numberDiff line numberDiff line change
@@ -602,9 +602,3 @@ variable "enable_tpu" {
602602
description = "Enable Cloud TPU resources in the cluster. WARNING: changing this after cluster creation is destructive!"
603603
default = false
604604
}
605-
606-
variable "_parent_module" {
607-
type = string
608-
description = "(Internal) Parent module which should be referenced in API calls."
609-
default = ""
610-
}

modules/beta-private-cluster/versions.tf

+1-5
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
*/
1616

1717

18-
locals {
19-
blueprint_name = join("/", compact([var._parent_module, "terraform-google-kubernetes-engine:beta-private-cluster/v14.0.0"]))
20-
}
21-
2218
terraform {
2319
required_version = ">=0.13"
2420

@@ -33,6 +29,6 @@ terraform {
3329
}
3430
}
3531
provider_meta "google-beta" {
36-
module_name = "blueprints/terraform/${local.blueprint_name}"
32+
module_name = "blueprints/terraform/terraform-google-kubernetes-engine:beta-private-cluster/v14.0.0"
3733
}
3834
}

modules/beta-public-cluster-update-variant/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ Then perform the following commands on the root folder:
148148

149149
| Name | Description | Type | Default | Required |
150150
|------|-------------|------|---------|:--------:|
151-
| \_parent\_module | (Internal) Parent module which should be referenced in API calls. | `string` | `""` | no |
152151
| add\_cluster\_firewall\_rules | Create additional firewall rules | `bool` | `false` | no |
153152
| add\_shadow\_firewall\_rules | Create GKE shadow firewall (the same as default firewall rules with firewall logs enabled). | `bool` | `false` | no |
154153
| authenticator\_security\_group | The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format [email protected] | `string` | `null` | no |

modules/beta-public-cluster-update-variant/variables.tf

-6
Original file line numberDiff line numberDiff line change
@@ -571,9 +571,3 @@ variable "enable_tpu" {
571571
description = "Enable Cloud TPU resources in the cluster. WARNING: changing this after cluster creation is destructive!"
572572
default = false
573573
}
574-
575-
variable "_parent_module" {
576-
type = string
577-
description = "(Internal) Parent module which should be referenced in API calls."
578-
default = ""
579-
}

modules/beta-public-cluster-update-variant/versions.tf

+1-5
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
*/
1616

1717

18-
locals {
19-
blueprint_name = join("/", compact([var._parent_module, "terraform-google-kubernetes-engine:beta-public-cluster-update-variant/v14.0.0"]))
20-
}
21-
2218
terraform {
2319
required_version = ">=0.13"
2420

@@ -33,6 +29,6 @@ terraform {
3329
}
3430
}
3531
provider_meta "google-beta" {
36-
module_name = "blueprints/terraform/${local.blueprint_name}"
32+
module_name = "blueprints/terraform/terraform-google-kubernetes-engine:beta-public-cluster-update-variant/v14.0.0"
3733
}
3834
}

modules/beta-public-cluster/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ Then perform the following commands on the root folder:
126126

127127
| Name | Description | Type | Default | Required |
128128
|------|-------------|------|---------|:--------:|
129-
| \_parent\_module | (Internal) Parent module which should be referenced in API calls. | `string` | `""` | no |
130129
| add\_cluster\_firewall\_rules | Create additional firewall rules | `bool` | `false` | no |
131130
| add\_shadow\_firewall\_rules | Create GKE shadow firewall (the same as default firewall rules with firewall logs enabled). | `bool` | `false` | no |
132131
| authenticator\_security\_group | The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format [email protected] | `string` | `null` | no |

modules/beta-public-cluster/variables.tf

-6
Original file line numberDiff line numberDiff line change
@@ -571,9 +571,3 @@ variable "enable_tpu" {
571571
description = "Enable Cloud TPU resources in the cluster. WARNING: changing this after cluster creation is destructive!"
572572
default = false
573573
}
574-
575-
variable "_parent_module" {
576-
type = string
577-
description = "(Internal) Parent module which should be referenced in API calls."
578-
default = ""
579-
}

modules/beta-public-cluster/versions.tf

+1-5
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
*/
1616

1717

18-
locals {
19-
blueprint_name = join("/", compact([var._parent_module, "terraform-google-kubernetes-engine:beta-public-cluster/v14.0.0"]))
20-
}
21-
2218
terraform {
2319
required_version = ">=0.13"
2420

@@ -33,6 +29,6 @@ terraform {
3329
}
3430
}
3531
provider_meta "google-beta" {
36-
module_name = "blueprints/terraform/${local.blueprint_name}"
32+
module_name = "blueprints/terraform/terraform-google-kubernetes-engine:beta-public-cluster/v14.0.0"
3733
}
3834
}

modules/private-cluster-update-variant/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ Then perform the following commands on the root folder:
151151

152152
| Name | Description | Type | Default | Required |
153153
|------|-------------|------|---------|:--------:|
154-
| \_parent\_module | (Internal) Parent module which should be referenced in API calls. | `string` | `""` | no |
155154
| add\_cluster\_firewall\_rules | Create additional firewall rules | `bool` | `false` | no |
156155
| add\_shadow\_firewall\_rules | Create GKE shadow firewall (the same as default firewall rules with firewall logs enabled). | `bool` | `false` | no |
157156
| basic\_auth\_password | The password to be used with Basic Authentication. | `string` | `""` | no |

modules/private-cluster-update-variant/variables.tf

-6
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,3 @@ variable "impersonate_service_account" {
468468
default = ""
469469
}
470470

471-
472-
variable "_parent_module" {
473-
type = string
474-
description = "(Internal) Parent module which should be referenced in API calls."
475-
default = ""
476-
}

modules/private-cluster-update-variant/versions.tf

+1-5
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
*/
1616

1717

18-
locals {
19-
blueprint_name = join("/", compact([var._parent_module, "terraform-google-kubernetes-engine:private-cluster-update-variant/v14.0.0"]))
20-
}
21-
2218
terraform {
2319
required_version = ">=0.13"
2420

@@ -33,6 +29,6 @@ terraform {
3329
}
3430
}
3531
provider_meta "google" {
36-
module_name = "blueprints/terraform/${local.blueprint_name}"
32+
module_name = "blueprints/terraform/terraform-google-kubernetes-engine:private-cluster-update-variant/v14.0.0"
3733
}
3834
}

modules/private-cluster/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ Then perform the following commands on the root folder:
129129

130130
| Name | Description | Type | Default | Required |
131131
|------|-------------|------|---------|:--------:|
132-
| \_parent\_module | (Internal) Parent module which should be referenced in API calls. | `string` | `""` | no |
133132
| add\_cluster\_firewall\_rules | Create additional firewall rules | `bool` | `false` | no |
134133
| add\_shadow\_firewall\_rules | Create GKE shadow firewall (the same as default firewall rules with firewall logs enabled). | `bool` | `false` | no |
135134
| basic\_auth\_password | The password to be used with Basic Authentication. | `string` | `""` | no |

modules/private-cluster/variables.tf

-6
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,3 @@ variable "impersonate_service_account" {
468468
default = ""
469469
}
470470

471-
472-
variable "_parent_module" {
473-
type = string
474-
description = "(Internal) Parent module which should be referenced in API calls."
475-
default = ""
476-
}

modules/private-cluster/versions.tf

+1-5
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
*/
1616

1717

18-
locals {
19-
blueprint_name = join("/", compact([var._parent_module, "terraform-google-kubernetes-engine:private-cluster/v14.0.0"]))
20-
}
21-
2218
terraform {
2319
required_version = ">=0.13"
2420

@@ -33,6 +29,6 @@ terraform {
3329
}
3430
}
3531
provider_meta "google" {
36-
module_name = "blueprints/terraform/${local.blueprint_name}"
32+
module_name = "blueprints/terraform/terraform-google-kubernetes-engine:private-cluster/v14.0.0"
3733
}
3834
}

modules/safer-cluster-update-variant/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ For simplicity, we suggest using `roles/container.admin` and
201201

202202
| Name | Description | Type | Default | Required |
203203
|------|-------------|------|---------|:--------:|
204-
| \_parent\_module | (Internal) Parent module which should be referenced in API calls. | `string` | `""` | no |
205204
| add\_cluster\_firewall\_rules | Create additional firewall rules | `bool` | `false` | no |
206205
| authenticator\_security\_group | The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format [email protected] | `string` | `null` | no |
207206
| cloudrun | (Beta) Enable CloudRun addon | `bool` | `false` | no |

modules/safer-cluster-update-variant/main.tf

-2
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,4 @@ module "gke" {
164164
gce_pd_csi_driver = var.gce_pd_csi_driver
165165

166166
notification_config_topic = var.notification_config_topic
167-
168-
_parent_module = local.blueprint_name
169167
}

modules/safer-cluster-update-variant/variables.tf

-6
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,3 @@ variable "notification_config_topic" {
375375
description = "The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}."
376376
default = ""
377377
}
378-
379-
variable "_parent_module" {
380-
type = string
381-
description = "(Internal) Parent module which should be referenced in API calls."
382-
default = ""
383-
}

modules/safer-cluster-update-variant/versions.tf

+1-5
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,10 @@
1717
// This file was automatically generated from a template in ./autogen/safer-cluster
1818

1919

20-
locals {
21-
blueprint_name = join("/", compact([var._parent_module, "terraform-google-kubernetes-engine:safer-cluster-update-variant/v14.0.0"]))
22-
}
23-
2420
terraform {
2521
required_version = ">=0.13"
2622

2723
provider_meta "google-beta" {
28-
module_name = "blueprints/terraform/${local.blueprint_name}"
24+
module_name = "blueprints/terraform/terraform-google-kubernetes-engine:safer-cluster-update-variant/v14.0.0"
2925
}
3026
}

modules/safer-cluster/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ For simplicity, we suggest using `roles/container.admin` and
201201

202202
| Name | Description | Type | Default | Required |
203203
|------|-------------|------|---------|:--------:|
204-
| \_parent\_module | (Internal) Parent module which should be referenced in API calls. | `string` | `""` | no |
205204
| add\_cluster\_firewall\_rules | Create additional firewall rules | `bool` | `false` | no |
206205
| authenticator\_security\_group | The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format [email protected] | `string` | `null` | no |
207206
| cloudrun | (Beta) Enable CloudRun addon | `bool` | `false` | no |

modules/safer-cluster/main.tf

-2
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,4 @@ module "gke" {
164164
gce_pd_csi_driver = var.gce_pd_csi_driver
165165

166166
notification_config_topic = var.notification_config_topic
167-
168-
_parent_module = local.blueprint_name
169167
}

0 commit comments

Comments
 (0)