Skip to content
This repository has been archived by the owner on Jan 13, 2020. It is now read-only.

Latest commit

 

History

History
 
 

repository-function

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Repository Function

This submodule configures a function sourced from a Cloud Source Repositories repository to respond to a given event trigger.

Alternatively, the [root module][root-module] configures a function sourced from a directory on localhost.

Usage

The automatic-labelling-from-repository example is a tested reference of how to use this submodule with the event-project-log-entry submodule.

Inputs

Name Description Type Default Required
available_memory_mb The amount of memory in megabytes allotted for the function to use. string "256" no
description The description of the function. string "Processes events." no
entry_point The name of a method in the function source which will be invoked when the function is executed. string n/a yes
environment_variables A set of key/value environment variable pairs to assign to the function. map <map> no
event_trigger A source that fires events in response to a condition in another service. map n/a yes
labels A set of key/value label pairs to assign to any lableable resources. map <map> no
name The name to apply to any nameable resources. string n/a yes
project_id The ID of the project to which resources will be applied. string n/a yes
region The region in which resources will be applied. string n/a yes
runtime The runtime in which the function will be executed. string "nodejs6" no
source_repository_url The URL of the repository which contains the function source code. string n/a yes
timeout_s The amount of time in seconds allotted for the execution of the function. string "60" no

Outputs

Name Description
name The name of the function.

Requirements

The following sections describe the requirements which must be met in order to invoke this module.

Software Dependencies

The following software dependencies must be installed on the system from which this module will be invoked:

  • Terraform v0.11.Z
  • [Terraform Provider for Google Cloud Platform][t7m-provider-gcp-site] v2.1.Z

IAM Roles

The Service Account which will be used to invoke this module must have the following IAM roles:

  • Cloud Functions Developer: roles/cloudfunctions.developer

APIs

The project against which this module will be invoked must have the following APIs enabled:

  • Cloud Functions API: cloudfunctions.googleapis.com