Create a web app to share large quantities of files to users across the globe
This solution quickly and securely deploys a three-tierd web app with a Javascript front end, a Golang back end, and a Firestore database on GCP. The goal of this solution is to utilize Google's Cloud CDN to serve large quantities of files (e.g., images, videos, documents) to users across the globe.
The resources/services/activations/deletions that this module will create/trigger are:
- Cloud Load Balancing
- Cloud Storage
- Cloud CDN
- Cloud Run
- Firestore
Name | Description | Type | Default | Required |
---|---|---|---|---|
bucket_location | Bucket location. https://cloud.google.com/storage/docs/locations | string |
"US" |
no |
disable_services_on_destroy | Whether project services will be disabled when the resources are destroyed. | bool |
false |
no |
init | Initialize the Firestore database or not | bool |
true |
no |
labels | A map of key/value label pairs to assign to the resources. | map(string) |
{ |
no |
lds_client_image | Docker image for frontend | string |
"gcr.io/hsa-resources-public/hsa-lds-golang-frontend:latest" |
no |
lds_initialization_archive_file_name | Archive file's name in lds-initialization bucket | string |
"initialization.tar.gz" |
no |
lds_initialization_bucket_name | Bucket for cloud run job | string |
"lds-resources-236348946525" |
no |
lds_server_image | Docker image for backend | string |
"gcr.io/hsa-resources-public/hsa-lds-golang-backend:latest" |
no |
project_id | GCP project ID. | string |
n/a | yes |
region | Google cloud region where the resource will be created. | string |
"us-west1" |
no |
Name | Description |
---|---|
bucket_name | Bucket name |
lb_external_ip | Frontend IP address of the load balancer |
These sections describe requirements for using this module.
The following dependencies must be available:
- Terraform v0.13
- Terraform Provider for GCP plugin v4.57
- roles/storage.objectAdmin
- roles/datastore.user
- roles/compute.networkUser
A service account with the following roles must be used to provision the resources of this module:
A project with the following APIs enabled must be used to host the resources of this module:
- compute.googleapis.com
- run.googleapis.com
- iam.googleapis.com
- firestore.googleapis.com
- vpcaccess.googleapis.com
- monitoring.googleapis.com