Skip to content

Commit 4d526f9

Browse files
authored
feat: add module_depends_on for asm sub module (terraform-google-modules#1323)
1 parent ed64058 commit 4d526f9

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

modules/asm/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +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 |
6364
| multicluster\_mode | [Preview] Determines whether remote secrets should be autogenerated across fleet cluster. | `string` | `"manual"` | no |
6465
| project\_id | The project in which the resource belongs. | `string` | n/a | yes |
6566

modules/asm/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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 = [kubernetes_config_map.asm_options]
66+
module_depends_on = concat([kubernetes_config_map.asm_options], var.module_depends_on)
6767
}

modules/asm/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,9 @@ variable "internal_ip" {
9292
type = bool
9393
default = false
9494
}
95+
96+
variable "module_depends_on" {
97+
description = "List of modules or resources this module depends on."
98+
type = list(any)
99+
default = []
100+
}

0 commit comments

Comments
 (0)