Men-deploy Cloud Function generasi ke-2 dengan pemicu Log Audit menggunakan Terraform
bookmark_borderbookmark
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Konfigurasi terraform lengkap untuk men-deploy Cloud Function generasi ke-2 berbasis peristiwa dengan resource
Contoh kode
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],[],[[["This Terraform configuration deploys an event-driven Cloud Function (2nd gen) triggered by Google Cloud Audit Logs, specifically monitoring for `storage.objects.create` events on a designated Google Cloud Storage bucket."],["The configuration utilizes a service account for both the Cloud Function and Eventarc trigger, granting it necessary roles like `run.invoker`, `eventarc.eventReceiver`, and `artifactregistry.reader`."],["A random ID is generated to create a unique prefix for the source and audit log buckets."],["The config specifies a filter for resource names using the `match-path-pattern` operator, enabling the function to be triggered only when `.txt` files are created within the specified bucket and allows path patterns."],["The Cloud Function's build configuration is specified, setting the runtime, entry point, and source code location, while also providing service configurations for instance scaling, memory, timeout, environment variables and network security."]]],[]]