Skip to content

Commit

Permalink
fix: added conditional requirement for memorystore terraform (GoogleC…
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspermai authored Aug 18, 2022
1 parent e039c68 commit d343b4e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions terraform/memorystore.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ resource "null_resource" "kustomization-update" {
command = "sed -i \"s/REDIS_IP/${google_redis_instance.redis-cart[0].host}/g\" ../kustomize/components/memorystore/kustomization.yaml"
}

# count specifies the number of instances to create;
# if var.memorystore is true then the resource is enabled
count = var.memorystore ? 1 : 0

depends_on = [
resource.google_redis_instance.redis-cart
]
Expand Down

0 comments on commit d343b4e

Please sign in to comment.