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:
@@ -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."
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user