support pre-made bundle archives in cloud function modules (#2358)

This commit is contained in:
Ludovico Magnocavallo
2024-06-13 14:58:23 +02:00
committed by GitHub
parent bbf81752a4
commit 97d77d263b
16 changed files with 227 additions and 141 deletions

View File

@@ -23,7 +23,7 @@ module "instance_monitor_function" {
bucket_config = {
}
bundle_config = {
source_dir = "${path.module}/functions/instance-monitor"
path = "${path.module}/functions/instance-monitor"
output_path = "bundle.zip"
}
function_config = {

View File

@@ -164,7 +164,7 @@ module "function_export" {
lifecycle_delete_age = 1
}
bundle_config = {
source_dir = "${path.module}/functions/export"
path = "${path.module}/functions/export"
output_path = "${path.module}/bundle-export.zip"
excludes = null
}
@@ -200,7 +200,7 @@ module "function_gcs2bq" {
lifecycle_delete_age = 1
}
bundle_config = {
source_dir = "${path.module}/functions/gcs2bq"
path = "${path.module}/functions/gcs2bq"
output_path = "${path.module}/bundle-gcs2bq.zip"
excludes = null
}

View File

@@ -85,7 +85,7 @@ module "cf" {
location = var.region
}
bundle_config = {
source_dir = "${path.module}/cf"
path = "${path.module}/cf"
output_path = var.bundle_path
}
service_account = module.service-account.email

View File

@@ -60,7 +60,7 @@ module "cf" {
location = var.region
}
bundle_config = {
source_dir = "${path.module}/src"
path = "${path.module}/src"
output_path = var.bundle_path
}
service_account_create = true

View File

@@ -73,7 +73,7 @@ module "cloud-function" {
}
build_worker_pool = var.cloud_function_config.build_worker_pool_id
bundle_config = {
source_dir = var.cloud_function_config.source_dir
path = var.cloud_function_config.source_dir
output_path = var.cloud_function_config.bundle_path
}
environment_variables = (
@@ -145,7 +145,7 @@ module "cloud-function-v2" {
}
build_worker_pool = var.cloud_function_config.build_worker_pool_id
bundle_config = {
source_dir = var.cloud_function_config.source_dir
path = var.cloud_function_config.source_dir
output_path = var.cloud_function_config.bundle_path
}
environment_variables = (

View File

@@ -94,7 +94,7 @@ module "cf" {
location = var.region
}
bundle_config = {
source_dir = "${path.module}/cf"
path = "${path.module}/cf"
output_path = var.bundle_path
}
service_account = module.service-account.email
@@ -116,7 +116,7 @@ module "cffile" {
lifecycle_delete_age_days = null
}
bundle_config = {
source_dir = "${path.module}/cffile"
path = "${path.module}/cffile"
output_path = var.bundle_path_cffile
excludes = null
}

View File

@@ -117,7 +117,7 @@ module "cf-restarter" {
location = var.region
}
bundle_config = {
source_dir = "${path.module}/function/restarter"
path = "${path.module}/function/restarter"
output_path = "restarter.zip"
}
service_account = module.service-account-restarter.email
@@ -145,7 +145,7 @@ module "cf-healthchecker" {
region = var.region
bucket_name = module.cf-restarter.bucket_name
bundle_config = {
source_dir = "${path.module}/function/healthchecker"
path = "${path.module}/function/healthchecker"
output_path = "healthchecker.zip"
}
service_account = module.service-account-healthchecker.email

View File

@@ -184,7 +184,7 @@ module "function-hello" {
bucket_name = "${var.name}-tf-cf-deploy"
ingress_settings = "ALLOW_INTERNAL_ONLY"
bundle_config = {
source_dir = "${path.module}/assets"
path = "${path.module}/assets"
output_path = "bundle.zip"
}
bucket_config = {