Skip to content

Commit 300eb1f

Browse files
authored
fix: change asm module depends_on method (terraform-google-modules#1354)
1 parent 47b5ff6 commit 300eb1f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

modules/asm/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ To deploy this config:
6060
| enable\_vpc\_sc | Determines whether to enable VPC-SC for this ASM installation. For more information read https://cloud.google.com/service-mesh/docs/managed/vpc-sc | `bool` | `false` | no |
6161
| fleet\_id | The fleet to use for this ASM installation. | `string` | `""` | no |
6262
| internal\_ip | Use internal ip for the cluster endpoint when running kubectl commands. | `bool` | `false` | no |
63-
| module\_depends\_on | List of modules or resources this module depends on. | `list(any)` | `[]` | no |
63+
| module\_depends\_on | List of modules or resources this module depends on. If multiple, all items must be the same type. | `list(any)` | `[]` | no |
6464
| multicluster\_mode | [Preview] Determines whether remote secrets should be autogenerated across fleet cluster. | `string` | `"manual"` | no |
6565
| project\_id | The project in which the resource belongs. | `string` | n/a | yes |
6666

modules/asm/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ resource "kubernetes_config_map" "asm_options" {
4848
ASM_OPTS = var.enable_cni ? "CNI=on" : null
4949
}
5050

51-
depends_on = [google_gke_hub_membership.membership, google_gke_hub_feature.mesh]
51+
depends_on = [google_gke_hub_membership.membership, google_gke_hub_feature.mesh, var.module_depends_on]
5252
}
5353

5454
module "cpr" {
@@ -63,5 +63,5 @@ module "cpr" {
6363
kubectl_create_command = "${path.module}/scripts/create_cpr.sh ${local.revision_name} ${local.channel} ${var.enable_cni} ${var.enable_vpc_sc}"
6464
kubectl_destroy_command = "${path.module}/scripts/destroy_cpr.sh ${local.revision_name}"
6565

66-
module_depends_on = concat([kubernetes_config_map.asm_options], var.module_depends_on)
66+
module_depends_on = [kubernetes_config_map.asm_options]
6767
}

modules/asm/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ variable "internal_ip" {
9494
}
9595

9696
variable "module_depends_on" {
97-
description = "List of modules or resources this module depends on."
97+
description = "List of modules or resources this module depends on. If multiple, all items must be the same type."
9898
type = list(any)
9999
default = []
100100
}

0 commit comments

Comments
 (0)