I've been trying to replicate the creation a Google Cloud Function via Terraform.
As part of the security, I am trying to disable unauthenticated invocations as this is enabled by default in the GUI of creating a cloud task:
However, looking at the examples found at the terraform documentation. It does not seem to offer this as a option aside from authenticating with all users / a single user. But this does not seem to replicate the functionality of reaching the 403 page when clicking the link, rather, just creating a entry into IAM and Admin where the user is being assigned a role Cloud Function Invoker. My Terraform code is given below:
resource "google_cloudfunctions_function" "function-api" {
name = "terraform-insert-group-members-api"
runtime = "python37"
timeout = 540
trigger_http = true
entry_point = "hello"
source_archive_bucket = google_storage_bucket.resource-storage.name
source_archive_object = google_storage_bucket_object.storage-object-code-api.name
}
What do I need to include to achieve this? Or is this achievable for Terraform?
Thanks, Jordan
