Skip to content

Instantly share code, notes, and snippets.

@jdyke

jdyke/main.tf Secret

Created March 25, 2020 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdyke/e7b19a8ee6a9cb19546549148473910d to your computer and use it in GitHub Desktop.
Save jdyke/e7b19a8ee6a9cb19546549148473910d to your computer and use it in GitHub Desktop.
resource "google_cloudfunctions_function" "iam_anomalous_grant_function" {
provider = google-beta
name = local.function_name
description = "Google Cloud Function to remediate Event Threat Detector IAM anomalous grant findings."
available_memory_mb = 128
source_archive_bucket = google_storage_bucket.bucket.name
source_archive_object = google_storage_bucket_object.archive.name
timeout = 60
entry_point = "process_log_entry"
service_account_email = google_service_account.iam_anomalous_grant_sa.email
runtime = "python37"
event_trigger {
event_type = "google.pubsub.topic.publish"
resource = google_pubsub_topic.iam_anomalous_grant_topic.name
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment