Skip to content

Commit 83eae98

Browse files
authored
fix: Remove deprecated variable "registry_project_id" (#832)
BREAKING CHANGE: Replaced `registry_project_id` with `registry_project_ids` list.
1 parent bb7c3ce commit 83eae98

File tree

31 files changed

+8
-118
lines changed

31 files changed

+8
-118
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ Then perform the following commands on the root folder:
178178
| project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes |
179179
| region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no |
180180
| regional | Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!) | `bool` | `true` | no |
181-
| registry\_project\_id | Deprecated. Replaced by `registry_project_ids`. Still works for the purposes of backwards compatibility, but will be removed in a future version. | `string` | `""` | no |
182181
| registry\_project\_ids | Projects holding Google Container Registries. If empty, we use the cluster project. If a service account is created and the `grant_registry_access` variable is set to `true`, the `storage.objectViewer` role is assigned on these projects. | `list(string)` | `[]` | no |
183182
| release\_channel | The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`. | `string` | `null` | no |
184183
| remove\_default\_node\_pool | Remove default node pool while setting up the cluster | `bool` | `false` | no |

autogen/main/sa.tf.tmpl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ locals {
2626
// if user set var.service_account it will be used even if var.create_service_account==true, so service account will be created but not used
2727
service_account = (var.service_account == "" || var.service_account == "create") && var.create_service_account ? local.service_account_list[0] : var.service_account
2828

29-
registry_projects_list = compact(
30-
length(var.registry_project_ids) == 0 && var.registry_project_id == ""
31-
? [var.project_id]
32-
: concat([var.registry_project_id], var.registry_project_ids)
33-
)
29+
registry_projects_list = length(var.registry_project_ids) == 0 ? [var.project_id] : var.registry_project_ids
3430
}
3531

3632
resource "random_string" "cluster_service_account_suffix" {

autogen/main/variables.tf.tmpl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -358,12 +358,6 @@ variable "grant_registry_access" {
358358
default = false
359359
}
360360

361-
variable "registry_project_id" {
362-
type = string
363-
description = "Deprecated. Replaced by `registry_project_ids`. Still works for the purposes of backwards compatibility, but will be removed in a future version."
364-
default = ""
365-
}
366-
367361
variable "registry_project_ids" {
368362
type = list(string)
369363
description = "Projects holding Google Container Registries. If empty, we use the cluster project. If a service account is created and the `grant_registry_access` variable is set to `true`, the `storage.objectViewer` role is assigned on these projects."

autogen/safer-cluster/main.tf.tmpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ module "gke" {
100100
// wants to maintain control of their service accounts.
101101
create_service_account = var.compute_engine_service_account == "" ? true : false
102102
service_account = var.compute_engine_service_account
103-
registry_project_id = var.registry_project_id
104103
registry_project_ids = var.registry_project_ids
105104
grant_registry_access = var.grant_registry_access
106105

autogen/safer-cluster/variables.tf.tmpl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,6 @@ variable "grant_registry_access" {
208208
default = true
209209
}
210210

211-
variable "registry_project_id" {
212-
type = string
213-
description = "Deprecated. Replaced by `registry_project_ids`. Still works for the purposes of backwards compatibility, but will be removed in a future version."
214-
default = ""
215-
}
216-
217211
variable "registry_project_ids" {
218212
type = list(string)
219213
description = "Projects holding Google Container Registries. If empty, we use the cluster project. If a service account is created and the `grant_registry_access` variable is set to `true`, the `storage.objectViewer` role is assigned on these projects."

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ Then perform the following commands on the root folder:
233233
| project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes |
234234
| region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no |
235235
| regional | Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!) | `bool` | `true` | no |
236-
| registry\_project\_id | Deprecated. Replaced by `registry_project_ids`. Still works for the purposes of backwards compatibility, but will be removed in a future version. | `string` | `""` | no |
237236
| registry\_project\_ids | Projects holding Google Container Registries. If empty, we use the cluster project. If a service account is created and the `grant_registry_access` variable is set to `true`, the `storage.objectViewer` role is assigned on these projects. | `list(string)` | `[]` | no |
238237
| release\_channel | The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`. | `string` | `null` | no |
239238
| remove\_default\_node\_pool | Remove default node pool while setting up the cluster | `bool` | `false` | no |

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ locals {
2626
// if user set var.service_account it will be used even if var.create_service_account==true, so service account will be created but not used
2727
service_account = (var.service_account == "" || var.service_account == "create") && var.create_service_account ? local.service_account_list[0] : var.service_account
2828

29-
registry_projects_list = compact(
30-
length(var.registry_project_ids) == 0 && var.registry_project_id == ""
31-
? [var.project_id]
32-
: concat([var.registry_project_id], var.registry_project_ids)
33-
)
29+
registry_projects_list = length(var.registry_project_ids) == 0 ? [var.project_id] : var.registry_project_ids
3430
}
3531

3632
resource "random_string" "cluster_service_account_suffix" {

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,6 @@ variable "grant_registry_access" {
346346
default = false
347347
}
348348

349-
variable "registry_project_id" {
350-
type = string
351-
description = "Deprecated. Replaced by `registry_project_ids`. Still works for the purposes of backwards compatibility, but will be removed in a future version."
352-
default = ""
353-
}
354-
355349
variable "registry_project_ids" {
356350
type = list(string)
357351
description = "Projects holding Google Container Registries. If empty, we use the cluster project. If a service account is created and the `grant_registry_access` variable is set to `true`, the `storage.objectViewer` role is assigned on these projects."

modules/beta-private-cluster/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ Then perform the following commands on the root folder:
211211
| project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes |
212212
| region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no |
213213
| regional | Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!) | `bool` | `true` | no |
214-
| registry\_project\_id | Deprecated. Replaced by `registry_project_ids`. Still works for the purposes of backwards compatibility, but will be removed in a future version. | `string` | `""` | no |
215214
| registry\_project\_ids | Projects holding Google Container Registries. If empty, we use the cluster project. If a service account is created and the `grant_registry_access` variable is set to `true`, the `storage.objectViewer` role is assigned on these projects. | `list(string)` | `[]` | no |
216215
| release\_channel | The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`. | `string` | `null` | no |
217216
| remove\_default\_node\_pool | Remove default node pool while setting up the cluster | `bool` | `false` | no |

modules/beta-private-cluster/sa.tf

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ locals {
2626
// if user set var.service_account it will be used even if var.create_service_account==true, so service account will be created but not used
2727
service_account = (var.service_account == "" || var.service_account == "create") && var.create_service_account ? local.service_account_list[0] : var.service_account
2828

29-
registry_projects_list = compact(
30-
length(var.registry_project_ids) == 0 && var.registry_project_id == ""
31-
? [var.project_id]
32-
: concat([var.registry_project_id], var.registry_project_ids)
33-
)
29+
registry_projects_list = length(var.registry_project_ids) == 0 ? [var.project_id] : var.registry_project_ids
3430
}
3531

3632
resource "random_string" "cluster_service_account_suffix" {

0 commit comments

Comments
 (0)