Implementa Cloud Functions (2nd gen) con el activador del registro de auditoría mediante Terraform
bookmark_borderbookmark
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Configuración completa de Terraform para implementar una función de Cloud Functions (2nd gen) controlada por eventos con recursos
Muestra de código
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","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."]]],[]]