This module demonstrates deploying a Media CDN Video on Demand solution. It creates two Cloud Storage buckets:
vod-upload-<random_suffix>
: Upload raw video files herevod-serving-<random_suffix>
: Transcoded video serving bucket.
A Google Cloud Function triggers a Transcoder API job convert and package raw
video files uploaded to the vod-upload
. Transcoded output is written to the
vod-serving
bucket.
A Media CDN service and origin is configured to serve the transcoded output.
The resources/services/activations/deletions that this module will create/trigger are:
- Two Cloud Storage buckets
- A Google Cloud Function
- A Media CDN service and origin
Basic usage of this module is as follows:
module "media_cdn_vod" {
source = "terraform-google-modules/media_cdn_vod/google"
version = "~> 0.1"
project_id = "<PROJECT ID>"
region = "us-central1"
Name | Description | Type | Default | Required |
---|---|---|---|---|
enable_apis | Whether or not to enable underlying apis in this solution. | string |
"true" |
no |
labels | A map of labels to apply to resources deployed by this blueprint | map(string) |
{ |
no |
project_id | The Project ID to deploy to | string |
n/a | yes |
region | The Compute Region to deploy to | string |
n/a | yes |
Name | Description |
---|---|
media_cdn_index | VOD landing page URL |
media_cdn_ipv4 | The Media CDN serving address |
serving_bucket | The VOD serving bucket and Media CDN origin |
upload_bucket | The VOD upload bucket |
These sections describe requirements for using this module.
The following dependencies must be available:
- Terraform >= 1.1.9
- Terraform Provider for GCP plugin >= v4.33
User or service account credentials with the following roles must be used to provision the resources of this module:
- Storage Admin:
roles/storage.admin
The Project Factory module and the IAM module may be used in combination to provision a service account with the necessary roles applied.
A project with the following APIs enabled must be used to host the resources of this module:
- Artifact Registry -
artifactregistry.googleapis.com
- Cloud Build API -
cloudbuild.googleapis.com
- Cloud Functions API -
cloudfunctions.googleapis.com
- Compute Engine API -
compute.googleapis.com
- Global Edge Cache Service (Media CDN) -
edgecache.googleapis.com
- Eventarc API -
eventarc.googleapis.com
- Identity and Access Management (IAM) API -
iam.googleapis.com
- Network Services API -
networkservices.googleapis.com
- Cloud Pub/Sub API -
pubsub.googleapis.com
- Cloud Run API -
run.googleapis.com
- Cloud Storage JSON API -
storage-api.googleapis.com
- Transcoder API -
transcoder.googleapis.com
The Project Factory module can be used to provision a project with the necessary APIs enabled.
Refer to the contribution guidelines for information on contributing to this module.
Please see our security disclosure process.