Skip to content

Commit

Permalink
Updating to Gen2
Browse files Browse the repository at this point in the history
  • Loading branch information
gbg3 committed Sep 25, 2024
1 parent 33cf01b commit 833a146
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ steps:
- functions
- deploy
- gcp-role-audit
- --gen2
- --region=us-central1
- --runtime=python312
- --memory=256MB
- --source=.
- --trigger-topic=gcp-role-audit-trigger
- --trigger-http
- --service-account=gcp-role-audit@up-eit-ce-production.iam.gserviceaccount.com
- --timeout=540
- --entry-point=main_http
Expand Down
8 changes: 6 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
def main_http(event, context):
import functions_framework
from cloudevents.http import CloudEvent

@functions_framework.http
def main_http(cloud_event: CloudEvent) -> None:
import owner_report_native

if __name__ == '__main__':
main_http(None)
main_http()
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pandas
google-cloud-bigquery
google-cloud-resource-manager
google-cloud-resource-manager
functions-framework==3.*

0 comments on commit 833a146

Please sign in to comment.