Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: change asm module depends_on method #1354

Merged
merged 1 commit into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/asm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +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 |
| module\_depends\_on | List of modules or resources this module depends on. If multiple, all items must be the same type. | `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
4 changes: 2 additions & 2 deletions modules/asm/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ resource "kubernetes_config_map" "asm_options" {
ASM_OPTS = var.enable_cni ? "CNI=on" : null
}

depends_on = [google_gke_hub_membership.membership, google_gke_hub_feature.mesh]
depends_on = [google_gke_hub_membership.membership, google_gke_hub_feature.mesh, var.module_depends_on]
}

module "cpr" {
Expand All @@ -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 = concat([kubernetes_config_map.asm_options], var.module_depends_on)
module_depends_on = [kubernetes_config_map.asm_options]
}
2 changes: 1 addition & 1 deletion modules/asm/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ variable "internal_ip" {
}

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