Skip to content

Commit

Permalink
Fix Terraform dependencies
Browse files Browse the repository at this point in the history
  *Deployment was failing due to wrong deployment order

Signed-off-by: Nindemic <[email protected]>
  • Loading branch information
Nindemic committed Jan 10, 2022
1 parent 3bc199d commit dabed23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions 02_deployHono/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ locals {
k8s_agent_count = terraform.workspace == "default" ? var.k8s_agent_count : var.testing_k8s_agent_count
k8s_dns_prefix = terraform.workspace == "default" ? var.k8s_dns_prefix : "${terraform.workspace}-${var.k8s_dns_prefix}"
domain_name = format("%s.westeurope.cloudapp.azure.com", local.k8s_dns_prefix)
email = "[email protected]"
}
email = "[email protected]}"

data "terraform_remote_state" "storagestate" {
workspace = terraform.workspace
Expand Down Expand Up @@ -48,7 +47,7 @@ module "persistent_storage" {
}

module "kafka" {
depends_on = [module.persistent_storage]
depends_on = [module.persistent_storage, module.ambassador]
source = "./modules/kafka"
}

Expand All @@ -60,12 +59,12 @@ module "hono" {
}

module "influxdb" {
depends_on = [module.persistent_storage]
depends_on = [module.persistent_storage, module.ambassador]
source = "./modules/influxdb"
}

module "mongodb" {
depends_on = [module.persistent_storage]
depends_on = [module.persistent_storage, module.ambassador]
source = "./modules/mongodb"
mongodb_username = var.mongodb_username
mongodb_password = var.mongodb_password
Expand Down
2 changes: 1 addition & 1 deletion 02_deployHono/modules/hono/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ resource "helm_release" "hono" {
chart = "hono"
version = "1.9.8"
cleanup_on_fail = "true"
#depends_on = [helm_release.mongodb]
depends_on = [helm_release.mongodb]
values = [
file("${path.module}/values.yaml")
]
Expand Down

0 comments on commit dabed23

Please sign in to comment.