cloud-function
fuzzylabs/cloud-function/google
An opinionated Terraform Module provisioning a Google Cloud Function
terraform-google-cloud-function This is an opinionated module following the best practice principle of least privilege permissions. By default a cloud function will use the default service account that has a very broad 'Editor role' attached to it. This module creates the following resources: - A HTTP Triggered Cloud Function - A Service Account specific to the Cloud Function - Bind a list of provided IAM roles to the service account. Usage Basic usage of this module is as follows: ``hcl module "cloud_function" { source = "github.com/fuzzylabs/terraform-google-cloud-function?ref=0.1.0" project = " " name = "foo" runtime = "go111" source_archive_bucket = " " source_archive_object = "/foo/bar.zip" entry_point = "mainFunction" } ` Functional examples are included in the examples directory. In
| Name | Type | Description | Default |
|---|---|---|---|
| runtime | string | The runtime in which the function is running | required |
| entry_point | string | Name of the function that will be executed when the Google Cloud Function is tri | required |
| project_id | string | The ID of the project in which to provision resources. | required |
| source_archive_bucket | string | The GCS bucket containing the zip archive which contains the function | required |
| source_archive_object | string | The source archive object (file) in archive bucket | required |
| region | string | The GCP region in which the resources will be provisioned. | required |
| name | string | The name of the cloud function to create | required |
| timeout | string | Function execution timeout (in seconds) | 60 |
| environment_variables | map | A map of key/value environment variable pairs to assign to the function | {} |
| roles | list | A list of roles to apply to the service account | [] |
| description | string | The description of the cloud function | "Created by Terraform" |
| available_memory_mb | string | Available memory (in MB) to the function. | 128 |
| trigger_http | string | If function is triggered by HTTP, this boolean is set | true |
service_account_email