diff --git a/modules/project_services/main.tf b/modules/project_services/main.tf index 56c1aa25..89381bc2 100644 --- a/modules/project_services/main.tf +++ b/modules/project_services/main.tf @@ -15,7 +15,7 @@ */ locals { - services = toset(concat(var.activate_apis, [for i in var.activate_api_identities : i.api])) + services = var.enable_apis ? toset(concat(var.activate_apis, [for i in var.activate_api_identities : i.api])) : toset([]) service_identities = flatten([ for i in var.activate_api_identities : [ for r in i.roles : diff --git a/modules/project_services/variables.tf b/modules/project_services/variables.tf index 76be30e0..e8c7570c 100644 --- a/modules/project_services/variables.tf +++ b/modules/project_services/variables.tf @@ -20,7 +20,7 @@ variable "project_id" { variable "enable_apis" { description = "Whether to actually enable the APIs. If false, this module is a no-op." - default = "true" + default = true } variable "activate_apis" {