Skip to content

Latest commit

 

History

History

fleet-events-function

Modules

No modules.

Resources

Name Type
google_cloud_run_service_iam_member.run_iam resource
google_cloudfunctions2_function.function resource
google_cloudfunctions2_function_iam_member.function_iam resource
google_project_iam_member.project_fleetengine_iam resource
google_project_iam_member.project_iam_sa_app resource
google_project_service.gcp_services resource
google_pubsub_topic_iam_member.member resource
google_service_account.sa_app resource
google_service_account.sa_fleetengine resource
google_service_account.sa_trigger resource
google_service_account_iam_binding.sa_fleetengine_iam resource
google_storage_bucket.bucket resource
google_storage_bucket_object.function_source resource
archive_file.zipfile data source
google_cloud_run_service.function_run data source
google_project.project data source
google_project.project_fleetengine data source
google_project.project_fleetengine_logs data source
google_pubsub_topic.fleetengine-logging-topic data source

Inputs

Name Description Type Default Required
FUNCTION_ADDITIONAL_ENV_VARS parameters passed to function as environmental variables. map(string) n/a yes
FUNCTION_AVAILABLE_MEMORY The amount of memory available for a function. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes. string "256M" no
FUNCTION_DESCRIPTION Description of the Cloud Function. string n/a yes
FUNCTION_ENTRYPOINT Entry Point of the Cloud Function string n/a yes
FUNCTION_MAX_INSTANCE_COUNT The limit on the maximum number of function instances that may coexist at a given time. number 3 no
FUNCTION_MAX_REQUEST_CONCURRENCY Sets the maximum number of concurrent requests that each instance can receive. only set value >1 when using larger instances (above 1vCPU, equivalent to 2GiB+ memory) https://cloud.google.com/functions/docs/configuring/memory number 1 no
FUNCTION_NAME Name of the Cloud Function. This will used as the indentifier of the Cloud Function (v2), and has to follow naming rules. Only lower case alphanumeric and '-' allowed. string n/a yes
FUNCTION_RUNTIME Function runtime (java11, java17, etc.) string "java11" no
FUNCTION_SRC_DIR Path to the directory where the Cloud Functions source code is located. string n/a yes
FUNCTION_SRC_EXCLUDE_FILES list of files under source folder to be excluded from source zip. list(string) [] no
FUNCTION_SRC_EXCLUDE_PATTERNS list of file patterns under source folder to be excluded from source zip. list(string) [] no
GCP_REGION For resources than can be constrained run or store data within a GCP region, the default region of preference. string "us-central1" no
GCP_REGION_FIRESTORE GCP Region for Firestore. If not set, will use value of GCP_REGION. Reference and choose the right one for your deployement https://cloud.google.com/firestore/docs/locations string "nam5" no
GCP_REGION_FUNCTIONS GCP Region for Function deployment. If not set, the value of GCP_REGION will be applied. Reference and choose the right one for your deployment https://cloud.google.com/functions/docs/locations string "us-central1" no
GCP_REGION_STORAGE GCP Region for Cloud Storage Buckets. If not set, the value of GCP_REGION will be applied. Reference and choose the right one for your deployment https://cloud.google.com/storage/docs/locations string "us-central1" no
PROJECT_APP The project to setup resources string n/a yes
PROJECT_FLEETENGINE Project ID of the project where Fleet Engine (ODRD/LMFS) is enabled. string n/a yes
PROJECT_FLEETENGINE_LOG Project ID of the project where Fleet Engine logs are persisted. (LogSink of Cloud Logging settings.) string n/a yes
SA_APP_ROLES Project level IAM Roles the Function's runtime Service Account requires. For example, it might require roles/datastore.user to use Datastore. list(string) [] no
SA_FLEETENGINE_ROLES Project level IAM Roles the Function's FleetEngine Service Account requires. If read only, roles such as roles/fleetengine.deliveryFleetReader can be sufficient list(string)
[
"roles/fleetengine.serviceSuperUser"
]
no
SUBSCRIPTION_FILTER filter to be applied to limit messages that reach the function. string "" no
TOPIC_FLEETENGINE_LOG Pub/Sub Topic to which Fleet Engine logs are published following Cloud Logging setup. string n/a yes
TOPIC_FLEETEVENTS_OUTPUT Pub/Sub Topic to which the deployed function will be publishing events. string n/a yes

Outputs

Name Description
function Deployed Cloud Function
projects Cloud Projects in use
serviceaccounts Service accounts in use
source Zipped source files