From 37251adb03ddb959d0abaa19685a19f2aff36758 Mon Sep 17 00:00:00 2001 From: David Bloss Date: Mon, 23 Dec 2024 09:47:32 -0600 Subject: [PATCH] WIP: finding bug --- modules/demo_account/services.tf | 14 ++++++++++++-- workspace/versions.tf | 4 ++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/modules/demo_account/services.tf b/modules/demo_account/services.tf index 3442002..06729fa 100644 --- a/modules/demo_account/services.tf +++ b/modules/demo_account/services.tf @@ -9,7 +9,8 @@ locals { } module "services_from_csv" { - for_each = { for svc in local.csv_services : svc.service_name => svc } + depends_on = [module.teams_from_csv] + for_each = { for svc in local.csv_services : svc.service_name => svc } source = "../service" name = each.value.service_name @@ -18,7 +19,7 @@ module "services_from_csv" { framework = each.value.framework language = each.value.language lifecycle_alias = each.value.lifecycle - owner = each.value.team_owner + owner = module.teams_from_csv[each.key].this.id tier_alias = each.value.tier tags = ["db:mysql", "k8s:true", "build_speed:fast"] tools = [ @@ -32,3 +33,12 @@ module "services_from_csv" { repositories = local.repository properties = local.properties } + +module "teams_from_csv" { + for_each = { for svc in local.csv_services : svc.service_name => svc } + + source = "../team" + + name = each.value.team_owner + parent = module.company-all.this.id +} diff --git a/workspace/versions.tf b/workspace/versions.tf index 1a44fa2..61da0b3 100644 --- a/workspace/versions.tf +++ b/workspace/versions.tf @@ -1,10 +1,10 @@ terraform { - required_version = ">= 1.9" + required_version = ">= 1.10" required_providers { opslevel = { source = "OpsLevel/opslevel" - version = "1.3.3" + version = "1.3.5" } } }