diff --git a/cerulean_cloud/cloud_function_ais_analysis/queuer.py b/cerulean_cloud/cloud_function_ais_analysis/queuer.py index b7a08d71..91152f90 100644 --- a/cerulean_cloud/cloud_function_ais_analysis/queuer.py +++ b/cerulean_cloud/cloud_function_ais_analysis/queuer.py @@ -29,7 +29,7 @@ def add_to_aaa_queue(scene_id): client = tasks_v2.CloudTasksClient() project = os.getenv("GCP_PROJECT") - location = os.getenv("GCP_LOCATION") + location = os.getenv("GCP_REGION") queue = os.getenv("QUEUE") url = os.getenv("FUNCTION_URL") dry_run = bool(os.getenv("IS_DRY_RUN")) diff --git a/cerulean_cloud/cloud_function_historical_run/main.py b/cerulean_cloud/cloud_function_historical_run/main.py index 81a4e707..37f21a34 100644 --- a/cerulean_cloud/cloud_function_historical_run/main.py +++ b/cerulean_cloud/cloud_function_historical_run/main.py @@ -166,7 +166,7 @@ def handler_queue(filtered_scenes, trigger_id): project = os.getenv("GCP_PROJECT") queue = os.getenv("QUEUE") - location = os.getenv("GCP_LOCATION") + location = os.getenv("GCP_REGION") url = os.getenv("ORCHESTRATOR_URL") dry_run = bool(os.getenv("IS_DRY_RUN")) diff --git a/cerulean_cloud/cloud_function_scene_relevancy/main.py b/cerulean_cloud/cloud_function_scene_relevancy/main.py index f7a8f7b5..e6e88fda 100644 --- a/cerulean_cloud/cloud_function_scene_relevancy/main.py +++ b/cerulean_cloud/cloud_function_scene_relevancy/main.py @@ -129,7 +129,7 @@ def handler_queue(filtered_scenes, trigger_id): project = os.getenv("GCP_PROJECT") queue = os.getenv("QUEUE") - location = os.getenv("GCP_LOCATION") + location = os.getenv("GCP_REGION") url = os.getenv("ORCHESTRATOR_URL") dry_run = bool(os.getenv("IS_DRY_RUN")) diff --git a/stack/cloud_function_ais_analysis.py b/stack/cloud_function_ais_analysis.py index 48c61f92..ea74bbfd 100644 --- a/stack/cloud_function_ais_analysis.py +++ b/stack/cloud_function_ais_analysis.py @@ -39,7 +39,7 @@ config_values = { "DB_URL": database.sql_instance_url_with_asyncpg, "GCP_PROJECT": pulumi.Config("gcp").require("project"), - "GCP_LOCATION": pulumi.Config("gcp").require("region"), + "GCP_REGION": pulumi.Config("gcp").require("region"), "QUEUE": queue.name, "FUNCTION_NAME": function_name, "API_KEY": pulumi.Config("cerulean-cloud").require("apikey"), diff --git a/stack/cloud_function_historical_run.py b/stack/cloud_function_historical_run.py index fa6156b9..bd0fcd17 100644 --- a/stack/cloud_function_historical_run.py +++ b/stack/cloud_function_historical_run.py @@ -15,7 +15,7 @@ config_values = { "DB_URL": database.sql_instance_url, "GCP_PROJECT": pulumi.Config("gcp").require("project"), - "GCP_LOCATION": pulumi.Config("gcp").require("region"), + "GCP_REGION": pulumi.Config("gcp").require("region"), "QUEUE": cloud_function_scene_relevancy.queue.name, "ORCHESTRATOR_URL": cloud_run_orchestrator.default.statuses[0].url, "FUNCTION_NAME": function_name, diff --git a/stack/cloud_function_scene_relevancy.py b/stack/cloud_function_scene_relevancy.py index 10793268..e02e2c08 100644 --- a/stack/cloud_function_scene_relevancy.py +++ b/stack/cloud_function_scene_relevancy.py @@ -40,7 +40,7 @@ config_values = { "DB_URL": database.sql_instance_url, "GCP_PROJECT": pulumi.Config("gcp").require("project"), - "GCP_LOCATION": pulumi.Config("gcp").require("region"), + "GCP_REGION": pulumi.Config("gcp").require("region"), "QUEUE": queue.name, "ORCHESTRATOR_URL": cloud_run_orchestrator.default.statuses[0].url, "FUNCTION_NAME": function_name, diff --git a/stack/cloud_run_orchestrator.py b/stack/cloud_run_orchestrator.py index 629dc041..91f8e034 100644 --- a/stack/cloud_run_orchestrator.py +++ b/stack/cloud_run_orchestrator.py @@ -95,6 +95,10 @@ name="PROJECT_ID", value=pulumi.Config("gcp").require("project"), ), + gcp.cloudrun.ServiceTemplateSpecContainerEnvArgs( + name="GCP_REGION", + value=pulumi.Config("gcp").require("region"), + ), gcp.cloudrun.ServiceTemplateSpecContainerEnvArgs( name="API_KEY", value=pulumi.Config("cerulean-cloud").require("apikey"),