service_account_config for Cloud Run v2

Additional changes:
* align vpc-connector interface to Cloud Functions
* split managed and unmanaged resources into separate files, this makes
  easier to introduce further changes
* add support for contexts
* move `vpc_connector` variable to variables.tf for Cloud Functions
* remove `create` from `vpc_connector` in Cloud Functions as it was
  sharing the meaning with `vpc_connector_create`
This commit is contained in:
Wiktor Niesiobędzki
2025-10-26 14:33:26 +00:00
parent 5d46e8b86b
commit 2e42c1b548
66 changed files with 2484 additions and 1543 deletions

View File

@@ -15,7 +15,7 @@
*/
variable "vpc_connector_create" {
description = "Populate this to create a Serverless VPC Access connector."
description = "VPC connector network configuration. Must be provided if new VPC connector is being created."
type = object({
ip_cidr_range = optional(string)
machine_type = optional(string)
@@ -37,4 +37,12 @@ variable "vpc_connector_create" {
}), {})
})
default = null
validation {
condition = (
var.vpc_connector_create == null ||
try(var.vpc_connector_create.instances, null) != null ||
try(var.vpc_connector_create.throughput, null) != null
)
error_message = "VPC connector must specify either instances or throughput."
}
}