The release of cloud-run/v2 v0.13.0 introduced a backward-incompatible change regarding service account identity.
In v0.12.0, if no service account was provided, the module defaulted to using the project's default compute service account (<project-num>-compute@developer.gserviceaccount.com).
In v0.13.0, if no service account is provided, the module now creates a new service account by default.
To maintain the previous behavior (using the default compute service account instead of creating a new one), you must explicitly set create_service_account = false in your module configuration.
module "cloud_run_v2" {
source = "GoogleCloudPlatform/cloud-run/google//modules/v2"
version = "~> 0.13"
service_name = "cloud-run-v2"
project_id = var.project_id
location = "us-central1"
containers = [
{
container_image = "us-docker.pkg.dev/cloudrun/container/hello"
container_name = "hello-world"
}
]
# Set to false to use the default compute service account instead of creating a new one
create_service_account = false
}