fix cloud function missing env vars

This commit is contained in:
johnpccd 2025-05-25 00:09:57 +02:00
parent 504d9d8bc0
commit d65e4e64f3
4 changed files with 298 additions and 55 deletions

View File

@ -22,20 +22,35 @@ logger = logging.getLogger(__name__)
# Initialize clients # Initialize clients
vision_client = vision.ImageAnnotatorClient() vision_client = vision.ImageAnnotatorClient()
firestore_client = firestore.Client()
# Get Firestore configuration from environment variables
FIRESTORE_PROJECT_ID = os.environ.get('FIRESTORE_PROJECT_ID')
FIRESTORE_DATABASE_NAME = os.environ.get('FIRESTORE_DATABASE_NAME', '(default)')
# Initialize Firestore client with correct project and database
if FIRESTORE_PROJECT_ID:
firestore_client = firestore.Client(project=FIRESTORE_PROJECT_ID, database=FIRESTORE_DATABASE_NAME)
else:
firestore_client = firestore.Client(database=FIRESTORE_DATABASE_NAME)
storage_client = storage.Client() storage_client = storage.Client()
# Get bucket name from environment variable
GCS_BUCKET_NAME = os.environ.get('GCS_BUCKET_NAME', 'sereact-images')
# Initialize Qdrant # Initialize Qdrant
QDRANT_HOST = os.environ.get('QDRANT_HOST', 'localhost') QDRANT_HOST = os.environ.get('QDRANT_HOST', 'localhost')
QDRANT_PORT = int(os.environ.get('QDRANT_PORT', '6333')) QDRANT_PORT = int(os.environ.get('QDRANT_PORT', '6333'))
QDRANT_API_KEY = os.environ.get('QDRANT_API_KEY') QDRANT_API_KEY = os.environ.get('QDRANT_API_KEY')
QDRANT_COLLECTION = os.environ.get('QDRANT_COLLECTION', 'image_vectors') QDRANT_COLLECTION = os.environ.get('QDRANT_COLLECTION', 'image_vectors')
QDRANT_HTTPS = os.environ.get('QDRANT_HTTPS', 'false').lower() == 'true'
try: try:
qdrant_client = QdrantClient( qdrant_client = QdrantClient(
host=QDRANT_HOST, host=QDRANT_HOST,
port=QDRANT_PORT, port=QDRANT_PORT,
api_key=QDRANT_API_KEY api_key=QDRANT_API_KEY,
https=QDRANT_HTTPS
) )
# Ensure collection exists # Ensure collection exists
@ -134,14 +149,13 @@ def process_image(image_id: str, storage_path: str, team_id: str, retry_count: i
""" """
try: try:
# Download image from Cloud Storage # Download image from Cloud Storage
bucket_name = storage_path.split('/')[0] # The storage_path is just the path within the bucket (e.g., "team_id/filename.jpg")
blob_path = '/'.join(storage_path.split('/')[1:]) # The bucket name comes from the environment variable
bucket = storage_client.bucket(GCS_BUCKET_NAME)
bucket = storage_client.bucket(bucket_name) blob = bucket.blob(storage_path)
blob = bucket.blob(blob_path)
if not blob.exists(): if not blob.exists():
logger.error(f"Image not found in storage: {storage_path}") logger.error(f"Image not found in storage: {GCS_BUCKET_NAME}/{storage_path}")
return False return False
# Download image data # Download image data

View File

@ -46,10 +46,25 @@ resource "google_cloudfunctions2_function" "image_processor" {
timeout_seconds = 540 timeout_seconds = 540
environment_variables = { environment_variables = {
# Qdrant configuration
QDRANT_HOST = google_compute_instance.vector_db_vm.network_interface[0].access_config[0].nat_ip QDRANT_HOST = google_compute_instance.vector_db_vm.network_interface[0].access_config[0].nat_ip
QDRANT_PORT = "6333" QDRANT_PORT = "6333"
QDRANT_API_KEY = var.qdrant_api_key QDRANT_API_KEY = var.qdrant_api_key
QDRANT_COLLECTION = "image_vectors" QDRANT_COLLECTION = "image_vectors"
QDRANT_HTTPS = "false"
# Firestore configuration
FIRESTORE_PROJECT_ID = var.project_id
FIRESTORE_DATABASE_NAME = var.firestore_db_name
# Google Cloud Storage configuration
GCS_BUCKET_NAME = var.storage_bucket_name
# Google Cloud Vision API
VISION_API_ENABLED = "true"
# Logging
LOG_LEVEL = "INFO"
} }
service_account_email = local.cloud_function_service_account service_account_email = local.cloud_function_service_account

View File

@ -1,7 +1,7 @@
{ {
"version": 4, "version": 4,
"terraform_version": "1.10.1", "terraform_version": "1.10.1",
"serial": 388, "serial": 393,
"lineage": "a183cd95-f987-8698-c6dd-84e933c394a5", "lineage": "a183cd95-f987-8698-c6dd-84e933c394a5",
"outputs": { "outputs": {
"cloud_function_name": { "cloud_function_name": {
@ -98,16 +98,16 @@
"attributes": { "attributes": {
"exclude_symlink_directories": null, "exclude_symlink_directories": null,
"excludes": null, "excludes": null,
"id": "ebb70c54eaebd24049805bcc1425349f70bc582d", "id": "045029ac803155784c12f8d587fee56b85b1fbe9",
"output_base64sha256": "+Q18L9q1o61gbnGJlSvTmwG9cRv1Qwzf8GI95No2Rb4=", "output_base64sha256": "b/FgNMMT30JSXfrLRXNkWeNc6i22YAmT3YwQRTw1+A4=",
"output_base64sha512": "tK0wkH07eL77+ytrOI8lcHATsN/nP0f/CYq0uzrrlhaRbJ+wsO1/6y0tmeX1hF6xqxW5ZDYTrhrSnayA+2afwQ==", "output_base64sha512": "7GDDTkHwwQVAlwSxe7yzgtGccMNIRCQ7t72ZRk7bcfDI1tzpruhJ5G/0AbrUMXWQO6LffnWtwumQ7XdFHAIzBA==",
"output_file_mode": null, "output_file_mode": null,
"output_md5": "95eb8ea5146b66f5b26bb830e3f0eab6", "output_md5": "34d81725abbd4f423de71ecd4215d116",
"output_path": "./function-source.zip", "output_path": "./function-source.zip",
"output_sha": "ebb70c54eaebd24049805bcc1425349f70bc582d", "output_sha": "045029ac803155784c12f8d587fee56b85b1fbe9",
"output_sha256": "f90d7c2fdab5a3ad606e7189952bd39b01bd711bf5430cdff0623de4da3645be", "output_sha256": "6ff16034c313df42525dfacb45736459e35cea2db6600993dd8c10453c35f80e",
"output_sha512": "b4ad30907d3b78befbfb2b6b388f25707013b0dfe73f47ff098ab4bb3aeb9616916c9fb0b0ed7feb2d2d99e5f5845eb1ab15b9643613ae1ad29dac80fb669fc1", "output_sha512": "ec60c34e41f0c105409704b17bbcb382d19c70c34844243bb7bd99464edb71f0c8d6dce9aee849e46ff401bad43175903ba2df7e75adc2e990ed77451c023304",
"output_size": 4781, "output_size": 5014,
"source": [], "source": [],
"source_content": null, "source_content": null,
"source_content_filename": null, "source_content_filename": null,
@ -471,7 +471,7 @@
"automatic_update_policy": [ "automatic_update_policy": [
{} {}
], ],
"build": "projects/761163285547/locations/us-central1/builds/d3341e98-07e4-49de-8dc7-3d53e4d2570a", "build": "projects/761163285547/locations/us-central1/builds/1b8e28d1-ee4d-4d2f-acf2-47e2b03aa421",
"docker_repository": "projects/gen-lang-client-0424120530/locations/us-central1/repositories/gcf-artifacts", "docker_repository": "projects/gen-lang-client-0424120530/locations/us-central1/repositories/gcf-artifacts",
"entry_point": "process_image_embedding", "entry_point": "process_image_embedding",
"environment_variables": {}, "environment_variables": {},
@ -485,7 +485,7 @@
{ {
"bucket": "gen-lang-client-0424120530-cloud-function-source", "bucket": "gen-lang-client-0424120530-cloud-function-source",
"generation": 1748123369545880, "generation": 1748123369545880,
"object": "function-source-95eb8ea5146b66f5b26bb830e3f0eab6.zip" "object": "function-source-34d81725abbd4f423de71ecd4215d116.zip"
} }
] ]
} }
@ -511,7 +511,7 @@
], ],
"id": "projects/gen-lang-client-0424120530/locations/us-central1/functions/process-image-embedding", "id": "projects/gen-lang-client-0424120530/locations/us-central1/functions/process-image-embedding",
"kms_key_name": "", "kms_key_name": "",
"labels": null, "labels": {},
"location": "us-central1", "location": "us-central1",
"name": "process-image-embedding", "name": "process-image-embedding",
"project": "gen-lang-client-0424120530", "project": "gen-lang-client-0424120530",
@ -522,11 +522,17 @@
"available_memory": "512M", "available_memory": "512M",
"binary_authorization_policy": "", "binary_authorization_policy": "",
"environment_variables": { "environment_variables": {
"FIRESTORE_DATABASE_NAME": "sereact-imagedb",
"FIRESTORE_PROJECT_ID": "gen-lang-client-0424120530",
"GCS_BUCKET_NAME": "sereact-images",
"LOG_EXECUTION_ID": "true", "LOG_EXECUTION_ID": "true",
"LOG_LEVEL": "INFO",
"QDRANT_API_KEY": "", "QDRANT_API_KEY": "",
"QDRANT_COLLECTION": "image_vectors", "QDRANT_COLLECTION": "image_vectors",
"QDRANT_HOST": "34.71.6.1", "QDRANT_HOST": "34.71.6.1",
"QDRANT_PORT": "6333" "QDRANT_HTTPS": "false",
"QDRANT_PORT": "6333",
"VISION_API_ENABLED": "true"
}, },
"gcf_uri": "", "gcf_uri": "",
"ingress_settings": "ALLOW_ALL", "ingress_settings": "ALLOW_ALL",
@ -548,7 +554,7 @@
"goog-terraform-provisioned": "true" "goog-terraform-provisioned": "true"
}, },
"timeouts": null, "timeouts": null,
"update_time": "2025-05-24T21:52:26.933576416Z", "update_time": "2025-05-24T22:08:16.899711009Z",
"url": "https://us-central1-gen-lang-client-0424120530.cloudfunctions.net/process-image-embedding" "url": "https://us-central1-gen-lang-client-0424120530.cloudfunctions.net/process-image-embedding"
}, },
"sensitive_attributes": [ "sensitive_attributes": [
@ -865,7 +871,7 @@
"delete_protection_state": "DELETE_PROTECTION_DISABLED", "delete_protection_state": "DELETE_PROTECTION_DISABLED",
"deletion_policy": "ABANDON", "deletion_policy": "ABANDON",
"earliest_version_time": "2025-05-24T21:09:24.677010Z", "earliest_version_time": "2025-05-24T21:09:24.677010Z",
"etag": "IOXfuveKvY0DMKrW4vCEvY0D", "etag": "IPScrICPvY0DMKrW4vCEvY0D",
"id": "projects/gen-lang-client-0424120530/databases/sereact-imagedb", "id": "projects/gen-lang-client-0424120530/databases/sereact-imagedb",
"key_prefix": "", "key_prefix": "",
"location_id": "us-central1", "location_id": "us-central1",
@ -896,7 +902,7 @@
"schema_version": 0, "schema_version": 0,
"attributes": { "attributes": {
"condition": [], "condition": [],
"etag": "BwY16K9kGDo=", "etag": "BwY16LCINIE=",
"id": "gen-lang-client-0424120530/roles/eventarc.eventReceiver/serviceAccount:761163285547-compute@developer.gserviceaccount.com", "id": "gen-lang-client-0424120530/roles/eventarc.eventReceiver/serviceAccount:761163285547-compute@developer.gserviceaccount.com",
"member": "serviceAccount:761163285547-compute@developer.gserviceaccount.com", "member": "serviceAccount:761163285547-compute@developer.gserviceaccount.com",
"project": "gen-lang-client-0424120530", "project": "gen-lang-client-0424120530",
@ -920,7 +926,7 @@
"schema_version": 0, "schema_version": 0,
"attributes": { "attributes": {
"condition": [], "condition": [],
"etag": "BwY16Kj5NHI=", "etag": "BwY16LCINIE=",
"id": "gen-lang-client-0424120530/roles/datastore.user/serviceAccount:761163285547-compute@developer.gserviceaccount.com", "id": "gen-lang-client-0424120530/roles/datastore.user/serviceAccount:761163285547-compute@developer.gserviceaccount.com",
"member": "serviceAccount:761163285547-compute@developer.gserviceaccount.com", "member": "serviceAccount:761163285547-compute@developer.gserviceaccount.com",
"project": "gen-lang-client-0424120530", "project": "gen-lang-client-0424120530",
@ -944,7 +950,7 @@
"schema_version": 0, "schema_version": 0,
"attributes": { "attributes": {
"condition": [], "condition": [],
"etag": "BwY16K9kGDo=", "etag": "BwY16LCINIE=",
"id": "gen-lang-client-0424120530/roles/pubsub.subscriber/serviceAccount:761163285547-compute@developer.gserviceaccount.com", "id": "gen-lang-client-0424120530/roles/pubsub.subscriber/serviceAccount:761163285547-compute@developer.gserviceaccount.com",
"member": "serviceAccount:761163285547-compute@developer.gserviceaccount.com", "member": "serviceAccount:761163285547-compute@developer.gserviceaccount.com",
"project": "gen-lang-client-0424120530", "project": "gen-lang-client-0424120530",
@ -968,7 +974,7 @@
"schema_version": 0, "schema_version": 0,
"attributes": { "attributes": {
"condition": [], "condition": [],
"etag": "BwY16Kj5NHI=", "etag": "BwY16LCINIE=",
"id": "gen-lang-client-0424120530/roles/storage.objectViewer/serviceAccount:761163285547-compute@developer.gserviceaccount.com", "id": "gen-lang-client-0424120530/roles/storage.objectViewer/serviceAccount:761163285547-compute@developer.gserviceaccount.com",
"member": "serviceAccount:761163285547-compute@developer.gserviceaccount.com", "member": "serviceAccount:761163285547-compute@developer.gserviceaccount.com",
"project": "gen-lang-client-0424120530", "project": "gen-lang-client-0424120530",
@ -992,7 +998,7 @@
"schema_version": 0, "schema_version": 0,
"attributes": { "attributes": {
"condition": [], "condition": [],
"etag": "BwY16Kj5NHI=", "etag": "BwY16LCINIE=",
"id": "gen-lang-client-0424120530/roles/ml.developer/serviceAccount:761163285547-compute@developer.gserviceaccount.com", "id": "gen-lang-client-0424120530/roles/ml.developer/serviceAccount:761163285547-compute@developer.gserviceaccount.com",
"member": "serviceAccount:761163285547-compute@developer.gserviceaccount.com", "member": "serviceAccount:761163285547-compute@developer.gserviceaccount.com",
"project": "gen-lang-client-0424120530", "project": "gen-lang-client-0424120530",
@ -1489,21 +1495,21 @@
"content_encoding": "", "content_encoding": "",
"content_language": "", "content_language": "",
"content_type": "application/zip", "content_type": "application/zip",
"crc32c": "tbmr3A==", "crc32c": "YXAlNA==",
"customer_encryption": [], "customer_encryption": [],
"detect_md5hash": "leuOpRRrZvWya7gw4/Dqtg==", "detect_md5hash": "NNgXJau9T0I95x7NQhXRFg==",
"event_based_hold": false, "event_based_hold": false,
"generation": 1748123256911890, "generation": 1748124439573408,
"id": "gen-lang-client-0424120530-cloud-function-source-function-source-95eb8ea5146b66f5b26bb830e3f0eab6.zip", "id": "gen-lang-client-0424120530-cloud-function-source-function-source-34d81725abbd4f423de71ecd4215d116.zip",
"kms_key_name": "", "kms_key_name": "",
"md5hash": "leuOpRRrZvWya7gw4/Dqtg==", "md5hash": "NNgXJau9T0I95x7NQhXRFg==",
"md5hexhash": "95eb8ea5146b66f5b26bb830e3f0eab6", "md5hexhash": "34d81725abbd4f423de71ecd4215d116",
"media_link": "https://storage.googleapis.com/download/storage/v1/b/gen-lang-client-0424120530-cloud-function-source/o/function-source-95eb8ea5146b66f5b26bb830e3f0eab6.zip?generation=1748123256911890\u0026alt=media", "media_link": "https://storage.googleapis.com/download/storage/v1/b/gen-lang-client-0424120530-cloud-function-source/o/function-source-34d81725abbd4f423de71ecd4215d116.zip?generation=1748124439573408\u0026alt=media",
"metadata": {}, "metadata": null,
"name": "function-source-95eb8ea5146b66f5b26bb830e3f0eab6.zip", "name": "function-source-34d81725abbd4f423de71ecd4215d116.zip",
"output_name": "function-source-95eb8ea5146b66f5b26bb830e3f0eab6.zip", "output_name": "function-source-34d81725abbd4f423de71ecd4215d116.zip",
"retention": [], "retention": [],
"self_link": "https://www.googleapis.com/storage/v1/b/gen-lang-client-0424120530-cloud-function-source/o/function-source-95eb8ea5146b66f5b26bb830e3f0eab6.zip", "self_link": "https://www.googleapis.com/storage/v1/b/gen-lang-client-0424120530-cloud-function-source/o/function-source-34d81725abbd4f423de71ecd4215d116.zip",
"source": "./function-source.zip", "source": "./function-source.zip",
"storage_class": "STANDARD", "storage_class": "STANDARD",
"temporary_hold": false, "temporary_hold": false,

View File

@ -1,13 +1,17 @@
{ {
"version": 4, "version": 4,
"terraform_version": "1.10.1", "terraform_version": "1.10.1",
"serial": 381, "serial": 388,
"lineage": "a183cd95-f987-8698-c6dd-84e933c394a5", "lineage": "a183cd95-f987-8698-c6dd-84e933c394a5",
"outputs": { "outputs": {
"cloud_function_name": { "cloud_function_name": {
"value": "process-image-embedding", "value": "process-image-embedding",
"type": "string" "type": "string"
}, },
"cloud_function_url": {
"value": "https://process-image-embedding-p64zpdtkta-uc.a.run.app",
"type": "string"
},
"cloud_run_qdrant_host": { "cloud_run_qdrant_host": {
"value": "34.71.6.1", "value": "34.71.6.1",
"type": "string" "type": "string"
@ -455,10 +459,138 @@
}, },
{ {
"mode": "managed", "mode": "managed",
"type": "google_compute_address", "type": "google_cloudfunctions2_function",
"name": "vector_db_static_ip", "name": "image_processor",
"provider": "provider[\"registry.terraform.io/hashicorp/google\"]", "provider": "provider[\"registry.terraform.io/hashicorp/google\"]",
"instances": [] "instances": [
{
"schema_version": 0,
"attributes": {
"build_config": [
{
"automatic_update_policy": [
{}
],
"build": "projects/761163285547/locations/us-central1/builds/d3341e98-07e4-49de-8dc7-3d53e4d2570a",
"docker_repository": "projects/gen-lang-client-0424120530/locations/us-central1/repositories/gcf-artifacts",
"entry_point": "process_image_embedding",
"environment_variables": {},
"on_deploy_update_policy": [],
"runtime": "python311",
"service_account": "projects/gen-lang-client-0424120530/serviceAccounts/761163285547-compute@developer.gserviceaccount.com",
"source": [
{
"repo_source": [],
"storage_source": [
{
"bucket": "gen-lang-client-0424120530-cloud-function-source",
"generation": 1748123369545880,
"object": "function-source-95eb8ea5146b66f5b26bb830e3f0eab6.zip"
}
]
}
],
"worker_pool": ""
}
],
"description": "Process image embeddings and store in vector database",
"effective_labels": {
"goog-terraform-provisioned": "true"
},
"environment": "GEN_2",
"event_trigger": [
{
"event_filters": [],
"event_type": "google.cloud.pubsub.topic.v1.messagePublished",
"pubsub_topic": "projects/gen-lang-client-0424120530/topics/image-processing-topic",
"retry_policy": "RETRY_POLICY_RETRY",
"service_account_email": "761163285547-compute@developer.gserviceaccount.com",
"trigger": "projects/gen-lang-client-0424120530/locations/us-central1/triggers/process-image-embedding-422683",
"trigger_region": "us-central1"
}
],
"id": "projects/gen-lang-client-0424120530/locations/us-central1/functions/process-image-embedding",
"kms_key_name": "",
"labels": null,
"location": "us-central1",
"name": "process-image-embedding",
"project": "gen-lang-client-0424120530",
"service_config": [
{
"all_traffic_on_latest_revision": true,
"available_cpu": "0.3333",
"available_memory": "512M",
"binary_authorization_policy": "",
"environment_variables": {
"LOG_EXECUTION_ID": "true",
"QDRANT_API_KEY": "",
"QDRANT_COLLECTION": "image_vectors",
"QDRANT_HOST": "34.71.6.1",
"QDRANT_PORT": "6333"
},
"gcf_uri": "",
"ingress_settings": "ALLOW_ALL",
"max_instance_count": 10,
"max_instance_request_concurrency": 1,
"min_instance_count": 0,
"secret_environment_variables": [],
"secret_volumes": [],
"service": "projects/gen-lang-client-0424120530/locations/us-central1/services/process-image-embedding",
"service_account_email": "761163285547-compute@developer.gserviceaccount.com",
"timeout_seconds": 540,
"uri": "https://process-image-embedding-p64zpdtkta-uc.a.run.app",
"vpc_connector": "",
"vpc_connector_egress_settings": ""
}
],
"state": "ACTIVE",
"terraform_labels": {
"goog-terraform-provisioned": "true"
},
"timeouts": null,
"update_time": "2025-05-24T21:52:26.933576416Z",
"url": "https://us-central1-gen-lang-client-0424120530.cloudfunctions.net/process-image-embedding"
},
"sensitive_attributes": [
[
{
"type": "get_attr",
"value": "service_config"
},
{
"type": "index",
"value": {
"value": 0,
"type": "number"
}
},
{
"type": "get_attr",
"value": "environment_variables"
},
{
"type": "index",
"value": {
"value": "QDRANT_API_KEY",
"type": "string"
}
}
]
],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozNjAwMDAwMDAwMDAwLCJkZWxldGUiOjM2MDAwMDAwMDAwMDAsInVwZGF0ZSI6MzYwMDAwMDAwMDAwMH19",
"dependencies": [
"data.archive_file.function_source",
"data.google_project.current",
"google_compute_address.vector_db_static_ip",
"google_compute_instance.vector_db_vm",
"google_project_service.services",
"google_pubsub_topic.image_processing",
"google_service_account.vector_db_sa",
"google_storage_bucket.function_source",
"google_storage_bucket_object.function_source"
]
}
]
}, },
{ {
"mode": "managed", "mode": "managed",
@ -666,6 +798,12 @@
"zone": "us-central1-a" "zone": "us-central1-a"
}, },
"sensitive_attributes": [ "sensitive_attributes": [
[
{
"type": "get_attr",
"value": "metadata_startup_script"
}
],
[ [
{ {
"type": "get_attr", "type": "get_attr",
@ -699,12 +837,6 @@
"type": "get_attr", "type": "get_attr",
"value": "disk_encryption_key_rsa" "value": "disk_encryption_key_rsa"
} }
],
[
{
"type": "get_attr",
"value": "metadata_startup_script"
}
] ]
], ],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInVwZGF0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiNiJ9", "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInVwZGF0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiNiJ9",
@ -733,7 +865,7 @@
"delete_protection_state": "DELETE_PROTECTION_DISABLED", "delete_protection_state": "DELETE_PROTECTION_DISABLED",
"deletion_policy": "ABANDON", "deletion_policy": "ABANDON",
"earliest_version_time": "2025-05-24T21:09:24.677010Z", "earliest_version_time": "2025-05-24T21:09:24.677010Z",
"etag": "IPvK9cCKvY0DMKrW4vCEvY0D", "etag": "IOXfuveKvY0DMKrW4vCEvY0D",
"id": "projects/gen-lang-client-0424120530/databases/sereact-imagedb", "id": "projects/gen-lang-client-0424120530/databases/sereact-imagedb",
"key_prefix": "", "key_prefix": "",
"location_id": "us-central1", "location_id": "us-central1",
@ -754,6 +886,30 @@
} }
] ]
}, },
{
"mode": "managed",
"type": "google_project_iam_member",
"name": "function_eventarc_receiver",
"provider": "provider[\"registry.terraform.io/hashicorp/google\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"condition": [],
"etag": "BwY16K9kGDo=",
"id": "gen-lang-client-0424120530/roles/eventarc.eventReceiver/serviceAccount:761163285547-compute@developer.gserviceaccount.com",
"member": "serviceAccount:761163285547-compute@developer.gserviceaccount.com",
"project": "gen-lang-client-0424120530",
"role": "roles/eventarc.eventReceiver"
},
"sensitive_attributes": [],
"private": "bnVsbA==",
"dependencies": [
"data.google_project.current"
]
}
]
},
{ {
"mode": "managed", "mode": "managed",
"type": "google_project_iam_member", "type": "google_project_iam_member",
@ -764,7 +920,7 @@
"schema_version": 0, "schema_version": 0,
"attributes": { "attributes": {
"condition": [], "condition": [],
"etag": "BwY16KjLzjY=", "etag": "BwY16Kj5NHI=",
"id": "gen-lang-client-0424120530/roles/datastore.user/serviceAccount:761163285547-compute@developer.gserviceaccount.com", "id": "gen-lang-client-0424120530/roles/datastore.user/serviceAccount:761163285547-compute@developer.gserviceaccount.com",
"member": "serviceAccount:761163285547-compute@developer.gserviceaccount.com", "member": "serviceAccount:761163285547-compute@developer.gserviceaccount.com",
"project": "gen-lang-client-0424120530", "project": "gen-lang-client-0424120530",
@ -778,6 +934,30 @@
} }
] ]
}, },
{
"mode": "managed",
"type": "google_project_iam_member",
"name": "function_pubsub_subscriber",
"provider": "provider[\"registry.terraform.io/hashicorp/google\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"condition": [],
"etag": "BwY16K9kGDo=",
"id": "gen-lang-client-0424120530/roles/pubsub.subscriber/serviceAccount:761163285547-compute@developer.gserviceaccount.com",
"member": "serviceAccount:761163285547-compute@developer.gserviceaccount.com",
"project": "gen-lang-client-0424120530",
"role": "roles/pubsub.subscriber"
},
"sensitive_attributes": [],
"private": "bnVsbA==",
"dependencies": [
"data.google_project.current"
]
}
]
},
{ {
"mode": "managed", "mode": "managed",
"type": "google_project_iam_member", "type": "google_project_iam_member",
@ -788,7 +968,7 @@
"schema_version": 0, "schema_version": 0,
"attributes": { "attributes": {
"condition": [], "condition": [],
"etag": "BwY16KjLzjY=", "etag": "BwY16Kj5NHI=",
"id": "gen-lang-client-0424120530/roles/storage.objectViewer/serviceAccount:761163285547-compute@developer.gserviceaccount.com", "id": "gen-lang-client-0424120530/roles/storage.objectViewer/serviceAccount:761163285547-compute@developer.gserviceaccount.com",
"member": "serviceAccount:761163285547-compute@developer.gserviceaccount.com", "member": "serviceAccount:761163285547-compute@developer.gserviceaccount.com",
"project": "gen-lang-client-0424120530", "project": "gen-lang-client-0424120530",
@ -812,7 +992,7 @@
"schema_version": 0, "schema_version": 0,
"attributes": { "attributes": {
"condition": [], "condition": [],
"etag": "BwY16KjLzjY=", "etag": "BwY16Kj5NHI=",
"id": "gen-lang-client-0424120530/roles/ml.developer/serviceAccount:761163285547-compute@developer.gserviceaccount.com", "id": "gen-lang-client-0424120530/roles/ml.developer/serviceAccount:761163285547-compute@developer.gserviceaccount.com",
"member": "serviceAccount:761163285547-compute@developer.gserviceaccount.com", "member": "serviceAccount:761163285547-compute@developer.gserviceaccount.com",
"project": "gen-lang-client-0424120530", "project": "gen-lang-client-0424120530",
@ -902,6 +1082,20 @@
"sensitive_attributes": [], "sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInJlYWQiOjYwMDAwMDAwMDAwMCwidXBkYXRlIjoxMjAwMDAwMDAwMDAwfX0=" "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInJlYWQiOjYwMDAwMDAwMDAwMCwidXBkYXRlIjoxMjAwMDAwMDAwMDAwfX0="
}, },
{
"index_key": "eventarc.googleapis.com",
"schema_version": 0,
"attributes": {
"disable_dependent_services": null,
"disable_on_destroy": false,
"id": "gen-lang-client-0424120530/eventarc.googleapis.com",
"project": "gen-lang-client-0424120530",
"service": "eventarc.googleapis.com",
"timeouts": null
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInJlYWQiOjYwMDAwMDAwMDAwMCwidXBkYXRlIjoxMjAwMDAwMDAwMDAwfX0="
},
{ {
"index_key": "firestore.googleapis.com", "index_key": "firestore.googleapis.com",
"schema_version": 0, "schema_version": 0,
@ -916,6 +1110,20 @@
"sensitive_attributes": [], "sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInJlYWQiOjYwMDAwMDAwMDAwMCwidXBkYXRlIjoxMjAwMDAwMDAwMDAwfX0=" "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInJlYWQiOjYwMDAwMDAwMDAwMCwidXBkYXRlIjoxMjAwMDAwMDAwMDAwfX0="
}, },
{
"index_key": "pubsub.googleapis.com",
"schema_version": 0,
"attributes": {
"disable_dependent_services": null,
"disable_on_destroy": false,
"id": "gen-lang-client-0424120530/pubsub.googleapis.com",
"project": "gen-lang-client-0424120530",
"service": "pubsub.googleapis.com",
"timeouts": null
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInJlYWQiOjYwMDAwMDAwMDAwMCwidXBkYXRlIjoxMjAwMDAwMDAwMDAwfX0="
},
{ {
"index_key": "run.googleapis.com", "index_key": "run.googleapis.com",
"schema_version": 0, "schema_version": 0,
@ -1227,7 +1435,7 @@
} }
], ],
"id": "gen-lang-client-0424120530-cloud-function-source", "id": "gen-lang-client-0424120530-cloud-function-source",
"labels": null, "labels": {},
"lifecycle_rule": [], "lifecycle_rule": [],
"location": "US-CENTRAL1", "location": "US-CENTRAL1",
"logging": [], "logging": [],
@ -1291,7 +1499,7 @@
"md5hash": "leuOpRRrZvWya7gw4/Dqtg==", "md5hash": "leuOpRRrZvWya7gw4/Dqtg==",
"md5hexhash": "95eb8ea5146b66f5b26bb830e3f0eab6", "md5hexhash": "95eb8ea5146b66f5b26bb830e3f0eab6",
"media_link": "https://storage.googleapis.com/download/storage/v1/b/gen-lang-client-0424120530-cloud-function-source/o/function-source-95eb8ea5146b66f5b26bb830e3f0eab6.zip?generation=1748123256911890\u0026alt=media", "media_link": "https://storage.googleapis.com/download/storage/v1/b/gen-lang-client-0424120530-cloud-function-source/o/function-source-95eb8ea5146b66f5b26bb830e3f0eab6.zip?generation=1748123256911890\u0026alt=media",
"metadata": null, "metadata": {},
"name": "function-source-95eb8ea5146b66f5b26bb830e3f0eab6.zip", "name": "function-source-95eb8ea5146b66f5b26bb830e3f0eab6.zip",
"output_name": "function-source-95eb8ea5146b66f5b26bb830e3f0eab6.zip", "output_name": "function-source-95eb8ea5146b66f5b26bb830e3f0eab6.zip",
"retention": [], "retention": [],