Skip to content

Commit

Permalink
feat: add module_depends_on for asm sub module (#1323)
Browse files Browse the repository at this point in the history
  • Loading branch information
apeabody committed Jul 19, 2022
1 parent ed64058 commit 4d526f9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/asm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ To deploy this config:
| 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 |
| fleet\_id | The fleet to use for this ASM installation. | `string` | `""` | no |
| internal\_ip | Use internal ip for the cluster endpoint when running kubectl commands. | `bool` | `false` | no |
| module\_depends\_on | List of modules or resources this module depends on. | `list(any)` | `[]` | no |
| multicluster\_mode | [Preview] Determines whether remote secrets should be autogenerated across fleet cluster. | `string` | `"manual"` | no |
| project\_id | The project in which the resource belongs. | `string` | n/a | yes |

Expand Down
2 changes: 1 addition & 1 deletion modules/asm/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ module "cpr" {
kubectl_create_command = "${path.module}/scripts/create_cpr.sh ${local.revision_name} ${local.channel} ${var.enable_cni} ${var.enable_vpc_sc}"
kubectl_destroy_command = "${path.module}/scripts/destroy_cpr.sh ${local.revision_name}"

module_depends_on = [kubernetes_config_map.asm_options]
module_depends_on = concat([kubernetes_config_map.asm_options], var.module_depends_on)
}
6 changes: 6 additions & 0 deletions modules/asm/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,9 @@ variable "internal_ip" {
type = bool
default = false
}

variable "module_depends_on" {
description = "List of modules or resources this module depends on."
type = list(any)
default = []
}

0 comments on commit 4d526f9

Please sign in to comment.