Lightly refactor service agents locals in project module (#3380)

* lightly refactor project module service agent locals

* remove debug block

* tfdoc

* revert templatestring to format for universe kms

* reinstate moved block
This commit is contained in:
Ludovico Magnocavallo
2025-10-05 12:25:04 +02:00
committed by GitHub
parent 7aa4e453d7
commit 07d7a85da1
4 changed files with 101 additions and 95 deletions

View File

@@ -73,8 +73,12 @@ locals {
? "${local.prefix}${var.name}"
: "${local.universe_prefix}${local.prefix}${var.name}"
)
universe_prefix = var.universe == null ? "" : "${var.universe.prefix}:"
available_services = tolist(setsubtract(var.services, try(var.universe.unavailable_services, [])))
universe_prefix = var.universe == null ? "" : "${var.universe.prefix}:"
# available services are those declared, minus any unsupported by universe
available_services = tolist(setsubtract(
var.services,
try(var.universe.unavailable_services, [])
))
}
data "google_project" "project" {