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

GoogleCloudPlatform/terraform-large-data-sharing-golang-webapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Large data sharing Go web app

Description

Tagline

Create a web app to share large quantities of files to users across the globe

Detailed

This solution quickly and securely deploys a three-tiered web app with a Javascript front end, a Go 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

Inputs

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 resource or not bool true no
labels A map of key/value label pairs to assign to the resources. map(string)
{
"app": "large-data-sharing"
}
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 "jss-resources" 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
firestore_collection_id Firestore collection id. string "fileMetadata" no

Outputs

Name Description
bucket_name Bucket name
lb_external_ip Frontend IP address of the load balancer
neos_walkthrough_url Neos Tutorial URL

Requirements

These sections describe requirements for using this module.

Software

The following dependencies must be available:

Service Account

  • 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:

APIs

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
  • cloudtrace.googleapis.com