Skip to content

GCP Archetype - Cloud Functions #2

Description

@obriensystems

see ObrienlabsDev/biometric-gcp-functions#1

  uri: https://ptlm-2fw4j7ag7a-nn.a.run.app
state: ACTIVE
updateTime: '2025-12-17T18:43:43.315291100Z'
url: https://northamerica-northeast1-cloud-functions-arch-olx-7189.cloudfunctions.net/ptlm
Functions URL for project cloud-functions-arch-olx-7189 is the following
	https://ptlm-2fw4j7ag7a-nn.a.run.app
# deplooy
./deployment.sh -c true -d false -p true -b ops-cicd-olx
# failed - delete created project
 gcloud config set project ops-cicd-olx
./deployment.sh -c false -d true -p false -b ops-cicd-olx -s cloud-functions-arch-olx-1663
# retry
./deployment.sh -c true -d false -p true -b ops-cicd-olx



michaelobrien@mbp8 cloud-functions-java % ./deployment.sh -c false -d true -p false -b ops-cicd-olx -s cloud-functions-arch-olx-1663
Options are: -c true/false (create) -d (delete) true/false (delete proj) -p provision (true/false) -b BOOT_PROJ_ID -s STREAM_PROJECT_ID
existing project: 
Date: Tue 16 Dec 2025 15:41:09 EST
Timestamp: 1765917669
olx
running with create=false delete=true boot_project_id=ops-cicd-olx
Reusing project: cloud-functions-arch-olx-1663
STREAM_PROJECT_ID: cloud-functions-arch-olx-1663
billingAccountName: ''
billingEnabled: false
name: projects/cloud-functions-arch-olx-1663/billingInfo
projectId: cloud-functions-arch-olx-1663
Deleted [https://cloudresourcemanager.googleapis.com/v1/projects/cloud-functions-arch-olx-1663].

You can undo this operation for a limited period by running the command below.
    $ gcloud projects undelete cloud-functions-arch-olx-1663

See https://cloud.google.com/resource-manager/docs/creating-managing-projects for information on shutting down projects.
WARNING: Your active project does not match the quota project in your local Application Default Credentials file. This might result in unexpected quota issues.

To update your Application Default Credentials quota project, use the `gcloud auth application-default set-quota-project` command.
Updated property [core/project].
Total Duration: 1765917675 sec
Date: Tue 16 Dec 2025 15:41:15 EST
Timestamp: 1765917675
**** Done ****
michaelobrien@mbp8 cloud-functions-java % ./deployment.sh -c true -d false -p true -b ops-cicd-olx                                  
Options are: -c true/false (create) -d (delete) true/false (delete proj) -p provision (true/false) -b BOOT_PROJ_ID -s STREAM_PROJECT_ID
existing project: 
Date: Tue 16 Dec 2025 15:43:36 EST
Timestamp: 1765917816
olx
running with create=true delete=false boot_project_id=ops-cicd-olx
Creating project: cloud-functions-arch-olx-1562
STREAM_PROJECT_ID: cloud-functions-arch-olx-1562
WARNING: Your active project does not match the quota project in your local Application Default Credentials file. This might result in unexpected quota issues.

To update your Application Default Credentials quota project, use the `gcloud auth application-default set-quota-project` command.
Updated property [core/project].
Creating project: cloud-functions-arch-olx-1562 on folder: 579268326076
Create in progress for [https://cloudresourcemanager.googleapis.com/v1/projects/cloud-functions-arch-olx-1562].
Waiting for [operations/create_project.global.5750937519532356271] to finish...done.                                                                                                                                                      
Enabling service [cloudapis.googleapis.com] on project [cloud-functions-arch-olx-1562]...
Operation "operations/acat.p2-1006151201230-5d0c4d98-ffa7-45bd-a9ae-d2505f65b5e1" finished successfully.
Updated property [core/project] to [cloud-functions-arch-olx-1562].
billingAccountName: billingAccounts/01BCCE-4EC0EE-DC58C8
billingEnabled: true
name: projects/cloud-functions-arch-olx-1562/billingInfo
projectId: cloud-functions-arch-olx-1562
WARNING: Your active project does not match the quota project in your local Application Default Credentials file. This might result in unexpected quota issues.

To update your Application Default Credentials quota project, use the `gcloud auth application-default set-quota-project` command.
Updated property [core/project].
Operation "operations/acf.p2-1006151201230-c8ec5ea5-9c55-440c-9330-60950b4eafab" finished successfully.
Operation "operations/acf.p2-1006151201230-c6a96162-5fec-41e0-9ee0-97b6f50a4d3b" finished successfully.
Operation "operations/acf.p2-1006151201230-dbc78d56-1d19-458d-9b6c-bf1ab7b635f0" finished successfully.
WARNING: Your active project does not match the quota project in your local Application Default Credentials file. This might result in unexpected quota issues.

To update your Application Default Credentials quota project, use the `gcloud auth application-default set-quota-project` command.
Updated property [core/project].
current project switched to 
cloud-functions-arch-olx-1562
PROJECT_NUMBER: 1006151201230
bind 1006151201230-compute@developer.gserviceaccount.com
Updated IAM policy for organization [1064386348915].
wait 60 sec
provisioning to cloud-functions-arch-olx-1562
Preparing function...done.                                                                                                                                                                                                                
X Deploying function...                                                                                                                                                                                                                   
    [Build] Logs are available at [https://console.cloud.google.com/cloud-build/builds;region=us-central1/8cb26aa0-51dd-4bb9-a690-4d5f0c74d3e2?project=1006151201230]                                                                     
  ✓ [Service]                                                                                                                                                                                                                             
  . [ArtifactRegistry]                                                                                                                                                                                                                    
  . [Healthcheck]                                                                                                                                                                                                                         
  . [Triggercheck]                                                                                                                                                                                                                        
Completed with warnings:                                                                                                                                                                                                                  
  [WARNING] Failed to find vendored functions-framework dependency. Installing version 1.4.1:
<nil>
You can view your function in the Cloud Console here: https://console.cloud.google.com/functions/details/us-central1/ptlm?project=cloud-functions-arch-olx-1562

buildConfig:
  automaticUpdatePolicy: {}
  build: projects/1006151201230/locations/us-central1/builds/8cb26aa0-51dd-4bb9-a690-4d5f0c74d3e2
  dockerRegistry: ARTIFACT_REGISTRY
  dockerRepository: projects/cloud-functions-arch-olx-1562/locations/us-central1/repositories/gcf-artifacts
  entryPoint: gcfv2.PeriodicTableLMHttpFunction
  runtime: java17
  serviceAccount: projects/cloud-functions-arch-olx-1562/serviceAccounts/1006151201230-compute@developer.gserviceaccount.com
  source:
    storageSource:
      bucket: gcf-v2-sources-1006151201230-us-central1
      generation: '1765917943380012'
      object: ptlm/function-source.zip
  sourceProvenance:
    resolvedStorageSource:
      bucket: gcf-v2-sources-1006151201230-us-central1
      generation: '1765917943380012'
      object: ptlm/function-source.zip
createTime: '2025-12-16T20:45:44.612422340Z'
environment: GEN_2
labels:
  deployment-tool: cli-gcloud
name: projects/cloud-functions-arch-olx-1562/locations/us-central1/functions/ptlm
satisfiesPzi: true
serviceConfig:
  allTrafficOnLatestRevision: true
  availableCpu: '0.3333'
  availableMemory: 512M
  environmentVariables:
    LOG_EXECUTION_ID: 'true'
  ingressSettings: ALLOW_ALL
  maxInstanceRequestConcurrency: 1
  revision: ptlm-00001-tiq
  service: projects/cloud-functions-arch-olx-1562/locations/us-central1/services/ptlm
  serviceAccountEmail: 1006151201230-compute@developer.gserviceaccount.com
  timeoutSeconds: 60
  uri: https://ptlm-xdk...q-uc.a.run.app
state: ACTIVE
updateTime: '2025-12-16T20:47:40.474969460Z'
url: https://us-ce...-1562.cloudfunctions.net/ptlm
WARNING: Your active project does not match the quota project in your local Application Default Credentials file. This might result in unexpected quota issues.

To update your Application Default Credentials quota project, use the `gcloud auth application-default set-quota-project` command.
Updated property [core/project].
Total Duration: 1765918063 sec
Date: Tue 16 Dec 2025 15:47:43 EST
Timestamp: 1765918063
**** Done ****

Image Image
https://u...ns-arch-olx-1562.cloudfunctions.net/ptlm
https://u...h-olx-1562.cloudfunctions.net/ptlm?list=first,second,third,forth

{key: 2, value: third}

getting function url

gcloud run services describe ptlm --platform=managed --region=us-central1 --format='value(status.url)'

got it - missing project
gcloud functions describe ptlm --region=us-central1 --format="value(httpsTrigger.url, serviceConfig.uri)" --project=cloud-functions-arch-olx-1562
https://ptlm-xdksbnd2bq-uc.a.run.app

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions