Skip to content

Latest commit

 

History

History
68 lines (55 loc) · 5.29 KB

File metadata and controls

68 lines (55 loc) · 5.29 KB

Setting up Fleet Events reference solution

This example setups Fleet Events reference solution in an existing Google Cloud project.

First, create file terraform.tfvars with the following :

PROJECT_FLEETENGINE = "[Your Mobility(ODRD/LMFS) project]"
PROJECT_FLEETEVENTS = "[Your Fleet Events project(pre-created)]"
GCP_REGION          = "[GCP Region to use]"
ME                  = "[Your Google account email address]"

Then run :

terraform init
terraform plan
terraform apply

Modules

Name Source Version
fleet-events ../../ n/a

Resources

Name Type
google_bigquery_dataset.bqsub_dataset resource
google_bigquery_dataset_iam_member.editor resource
google_bigquery_table.bqsub_table resource
google_project_service.gcp_services resource
google_project_service.gcp_services_bq resource
google_pubsub_subscription.bqsub resource
google_pubsub_topic.output_topic resource
google_pubsub_topic_iam_member.topic_iam resource
google_project.project-fleetengine data source
google_project.project-fleetevents data source

Inputs

Name Description Type Default Required
FLAG_SETUP_BIGQUERY_SUBSCRIPTION whether to setup a push BigQuery subscription for the Pub/Sub topic bool false 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 "fleetevents-fn" no
FUNCTION_SRC_DIR Path to the directory where the Cloud Functions source code is located. string "../../../../../cloud-functions/" no
GCP_REGION Default GCP region for Cloud resources. 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
ME Account ID (in the form of email address) of the developer running terraform. string n/a yes
MOBILITY_SOLUTION Mobility solution of use : either LMFS or ODRD string "LMFS" no
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
PROJECT_FLEETEVENTS Project ID of the project in which to setup Fleet Events reference solution. string n/a yes
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 what will be created and to which the deployed function will be publishing events. string "fleetevents-fn-output" no

Outputs

Name Description
function defails of function deployed
logging_config details of logging config