Skip to content

fabien-renaud/google-cloudfunction2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Cloudfunction2

Providers

Name Version
google n/a

Example

module "cloudfunction" {
  source      = "github.com/fabien-renaud/google-cloudfunction2"
  name        = "hello-world"
  project     = "hello-world"
  location    = "europe-west1"
  description = "Hello world deployed as a Cloudfunction2"
  account_id  = "hello-world"
  entrypoint  = "helloWorld"
  source_dir  = "../dist"
  output_path = "../dist"
}

Resources

Name Type
google_cloud_run_service_iam_member.main resource
google_cloudfunctions2_function.main resource
google_secret_manager_secret.main resource
google_secret_manager_secret_iam_member.main resource
google_secret_manager_secret_version.main resource
google_service_account.main resource
google_storage_bucket.main resource
google_storage_bucket_object.main resource
archive_file.main data source

Inputs

Name Description Type Default Required
account_id (Required) The account id that is used to generate the service account email address and a stable unique id. It is unique within a project, must be 6-30 characters long, and match the regular expression a-z to comply with RFC1035 string n/a yes
available_memory (Optional) The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes. string "512M" no
description (Optional) User-provided description of a function. string "" no
entrypoint (Optional) The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function". For Node.js this is name of a function exported by the module specified in source_location. string n/a yes
environment_variables (Optional) Environment variables that shall be available during function execution. map(string) {} no
excludes (Optional) Specify files to ignore when reading the source_dir. list(string) [] no
is_public (Optional) Should allow unauthenticated access bool true no
location (Required) The location of this cloud function. string n/a yes
max_instance_count (Optional) The limit on the maximum number of function instances that may coexist at a given time. number 3000 no
min_instance_count (Optional) The limit on the minimum number of function instances that may coexist at a given time. number 0 no
name (Required) A user-defined name of the function. Function names must be unique globally and match pattern projects//locations//functions/*. string n/a yes
output_path (Required) The output of the archive file. string n/a yes
project (Required) The ID of the project in which the resource belongs. string n/a yes
runtime (Optional) The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function. string "nodejs16" no
secret_environment_variables (Optional) Secret environment variables that shall be available during function execution. map(string) {} no
source_dir (Required) Package entire contents of this directory into the archive. string n/a yes
timeout_seconds (Optional) The function execution timeout. Execution is considered failed and can be terminated if the function is not completed at the end of the timeout period. number 540 no

Outputs

Name Description
name A user-defined name of the function. Function names must be unique globally and match pattern projects//locations//functions/*.
service_account_email The email of the service account for this function.
uri URI of the Service deployed.

About

Create Google CloudFunction

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages