{"id":26802390,"url":"https://github.com/red5pro/terraform-gcp-red5pro","last_synced_at":"2026-01-07T20:42:32.336Z","repository":{"id":227148303,"uuid":"747922539","full_name":"red5pro/terraform-gcp-red5pro","owner":"red5pro","description":"Terraform module for Red5 Pro in GCP","archived":false,"fork":false,"pushed_at":"2025-02-21T09:45:36.000Z","size":203,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-21T10:35:49.460Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.red5.net","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/red5pro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-24T22:45:40.000Z","updated_at":"2025-02-06T19:52:18.000Z","dependencies_parsed_at":"2024-03-11T21:47:55.407Z","dependency_job_id":"c21201f7-6f32-4acc-8816-361e7bdd8ca9","html_url":"https://github.com/red5pro/terraform-gcp-red5pro","commit_stats":null,"previous_names":["red5pro/terraform-gcp-red5pro"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/red5pro%2Fterraform-gcp-red5pro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/red5pro%2Fterraform-gcp-red5pro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/red5pro%2Fterraform-gcp-red5pro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/red5pro%2Fterraform-gcp-red5pro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/red5pro","download_url":"https://codeload.github.com/red5pro/terraform-gcp-red5pro/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246243527,"owners_count":20746312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-29T21:17:55.758Z","updated_at":"2026-01-07T20:42:32.330Z","avatar_url":"https://github.com/red5pro.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform Module for Deploying Red5 Pro Google Cloud Infrastructure (GCP) - Stream Manager 2.0\n\n[Red5 Pro](https://www.red5.net/) is a real-time video streaming server plaform known for its low-latency streaming capabilities, making it ideal for interactive applications like online gaming, streaming events and video conferencing etc.\n\nThis a reusable Terraform installer module for [Red5 Pro](https://www.red5.net/docs/installation/installation/googlecloudvminstall/) that provisions infrastucture over [Google Cloud(Gcloud)](https://console.cloud.google.com/).\n\n## Preparation\n\n### Install Terraform\n\n- Visit the [Terraform download page](https://developer.hashicorp.com/terraform/downloads) and ensure you get version 1.7.5 or higher.\n- Download the suitable version for your operating system.\n- Extract the compressed file and copy the Terraform binary to a location within your system's PATH.\n- Configure PATH for **Linux/macOS**:\n  - Open a terminal and type the following command:\n\n    ```sh\n    sudo mv /path/to/terraform /usr/local/bin\n    ```\n\n- Configure PATH for **Windows**:\n  - Click 'Start', search for 'Control Panel', and open it.\n  - Navigate to `System \u003e Advanced System Settings \u003e Environment Variables`.\n  - Under System variables, find 'PATH' and click 'Edit'.\n  - Click 'New' and paste the directory location where you extracted the terraform.exe file.\n  - Confirm changes by clicking 'OK' and close all open windows.\n  - Open a new terminal and verify that Terraform has been successfully installed.\n\n  ```sh\n  terraform --version\n  ```\n\n### Install jq\n\n- Install **jq** (Linux or Mac OS only) [Download](https://jqlang.github.io/jq/download/)\n  - Linux: `apt install jq`\n  - MacOS: `brew install jq`\n  \u003e It is used in bash scripts to create/delete Stream Manager node group using API\n\n  ### Install bc\n\n- Install **bc** (Linux or Mac OS only) [Download](https://www.gnu.org/software/bc/)\n  - Linux: `apt install bc`\n  - MacOS: `brew install bc`\n  \u003e It is used in bash scripts to create/delete Stream Manager node group using API\n\n### Red5 Pro artifacts\n\n- Download Red5 Pro server build in your [Red5 Pro Account](https://account.red5.net/downloads). Example: `red5pro-server-0.0.0.b0-release.zip`\n- Get Red5 Pro License key in your [Red5 Pro Account](https://account.red5.net/downloads). Example: `1111-2222-3333-4444`\n\n### Install Google Cloud SDK (GCP CLI)\n\n- [Installing the CLI](https://cloud.google.com/sdk/docs/install)\n\n### Prepare GCP Account\n\n- Create a service account for the Terraform module. The service account must have permission to create and manage the following resources:\n  - Identity and Access Management Rights\n    - Virtual Private Cloud (VPC)\n    - Compute Engine Instances\n    - Instance Templates\n    - Autoscaling Configurations\n    - Load Balancers\n    - SSL Certificates\n\n- Obtain the necessary credentials and information:\n  - Service Account with appropriate roles (e.g., `roles/editor` or custom roles with the above permissions)\n  - Generate and download a JSON key file for the service account\n  - Project ID  \n  - Region  \n  - Zone\n\n## This module has 3 variants of Red5 Pro deployments\n\n* **standalone** - Single instance with installed and configured Red5 Pro server\n* **cluster** - Stream Manager cluster (Stream Manager instance + Autoscaling Node group with Origin, Edge, Transcoder, Relay instance)\n* **autoscale** - Autoscale Stream Managers (Load Balancer + Autoscaling Stream Managers + Kafka Service + Autoscaling Node group with Origin, Edge, Transcoder, Relay instance)\n\n---\n\n## Standalone Red5 Pro server deployment (Standalone) - [Example](https://github.com/red5pro/terraform-gcp-red5pro/tree/master/examples/standalone)\n\nIn the following example, Terraform module will automates the infrastructure provisioning of the [Red5 Pro standalone server](https://www.red5.net/docs/installation/).\n\n### Terraform Deployed Resources (standalone)\n\n- VPC \n- Public Subnet  \n- Cloud Router \n- Firewall for Standalone Red5 Pro Server  \n- SSH Key Pair (use existing or create a new one)  \n- Standalone Red5 Pro Server Instance  \n- SSL Certificate for Standalone Red5 Pro Server Instance. Options:  \n  - `none`: Red5 Pro server without HTTPS and SSL certificate. Only HTTP on port `5080`  \n  - `letsencrypt`: Red5 Pro server with HTTPS and SSL certificate obtained by Let's Encrypt. HTTP on port `5080`, HTTPS on port `443`  \n  - `imported`: Red5 Pro server with HTTPS and imported SSL certificate. HTTP on port `5080`, HTTPS on port `443`\n\n#### Example main.tf (standalone)\n\n```yaml\nprovider \"google\" {\n  project = \"example-gcp-project-name\" # Google Cloud project ID (https://support.google.com/googleapi/answer/7014113?hl=en)\n}\n\nmodule \"red5pro\" {\n  source            = \"red5pro/red5pro/gcp\"\n  google_region     = \"us-west2\"                 # Google region where resources will create eg: us-west2\n  google_project_id = \"example-gcp-project-name\" # Google Cloud project ID (https://support.google.com/googleapi/answer/7014113?hl=en)\n\n  ubuntu_version        = \"22.04\"                               # The version of ubuntu which is used to create Instance, it can either be 20.04 or 22.04\n  type                  = \"standalone\"                          # Deployment type: standalone, cluster, autoscale\n  name                  = \"red5pro-standalone\"                  # Name to be used on all the resources as identifier\n  path_to_red5pro_build = \"./red5pro-server-0.0.b0-release.zip\" # Absolute path or relative path to Red5 Pro server ZIP file\n\n  # SSH key configuration\n  ssh_key_use_existing              = false                                               # Use existing SSH key pair or create a new one. true = use existing, false = create new SSH key pair\n  ssh_key_public_key_path_existing  = \"/PATH/TO/EXISTING/SSH/PRIVATE/KEY/example_key.pub\" # SSH public key path existing in local machine\n  ssh_key_private_key_path_existing = \"/PATH/TO/EXISTING/SSH/PRIVATE/KEY/example_key.pem\" # SSH private key path existing in local machine\n\n  # VPC configuration\n  vpc_use_existing  = false              # true - use existing VPC, false - create new VPC in Google Cloud\n  vpc_name_existing = \"example-vpc-name\" # VPC ID for existing VPC\n\n  # Firewall configuration\n  firewall_ssh_allowed_ip_ranges                = [\"0.0.0.0/0\"]                      # List of IP address ranges to provide SSH connection with Red5 Pro instances. Kindly provide your public IP to make SSH connection while running this terraform module\n  firewall_standalone_network_tags_use_existing = false                              # true - use existing firewall network tags, false - create new firewall network tags\n  firewall_standalone_network_tags_existing     = [\"example-tag-1\", \"example-tag-2\"] # Existing network tags name for firewall configuration\n\n  # Red5 Pro general configuration\n  red5pro_license_key = \"1111-2222-3333-4444\" # Red5 Pro license key (https://account.red5.net/login)\n  red5pro_api_enable  = true                  # true - enable Red5 Pro server API, false - disable Red5 Pro server API (https://www.red5.net/docs/development/api/overview/)\n  red5pro_api_key     = \"examplekey\"          # Red5 Pro server API key (https://www.red5.net/docs/development/api/overview/)\n\n  # Standalone Red5 Pro server Instance configuration\n  standalone_instance_type = \"n2-standard-2\" # Instance type for Red5 Pro server\n  standalone_disk_type     = \"pd-ssd\"        # Boot disk type for Standalone server. Possible values are `pd-ssd`, `pd-standard`, `pd-balanced`\n  standalone_disk_size     = 16              # Standalone server boot disk size in GB\n\n  # Red5Pro server configuration\n  standalone_red5pro_inspector_enable                    = false                         # true - enable Red5 Pro server inspector, false - disable Red5 Pro server inspector (https://www.red5.net/docs/troubleshooting/inspector/overview/)\n  standalone_red5pro_restreamer_enable                   = false                         # true - enable Red5 Pro server restreamer, false - disable Red5 Pro server restreamer (https://www.red5.net/docs/special/restreamer/overview/)\n  standalone_red5pro_socialpusher_enable                 = false                         # true - enable Red5 Pro server socialpusher, false - disable Red5 Pro server socialpusher (https://www.red5.net/docs/special/social-media-plugin/overview/)\n  standalone_red5pro_suppressor_enable                   = false                         # true - enable Red5 Pro server suppressor, false - disable Red5 Pro server suppressor\n  standalone_red5pro_hls_enable                          = false                         # true - enable Red5 Pro server HLS, false - disable Red5 Pro server HLS (https://www.red5.net/docs/protocols/hls-plugin/hls-vod/)\n  standalone_red5pro_round_trip_auth_enable              = false                         # true - enable Red5 Pro server round trip authentication, false - disable Red5 Pro server round trip authentication (https://www.red5.net/docs/special/round-trip-auth/overview/)\n  standalone_red5pro_round_trip_auth_host                = \"round-trip-auth.example.com\" # Round trip authentication server host\n  standalone_red5pro_round_trip_auth_port                = 3000                          # Round trip authentication server port\n  standalone_red5pro_round_trip_auth_protocol            = \"http\"                        # Round trip authentication server protocol\n  standalone_red5pro_round_trip_auth_endpoint_validate   = \"/validateCredentials\"        # Round trip authentication server endpoint for validate\n  standalone_red5pro_round_trip_auth_endpoint_invalidate = \"/invalidateCredentials\"      # Round trip authentication server endpoint for invalidate\n  standalone_red5pro_cloudstorage_enable                 = false                         # Red5 Pro server cloud storage enable/disable (https://www.red5.net/docs/special/cloudstorage-plugin/google-cloud-platform-storage/)\n  standalone_red5pro_google_storage_access_key           = \"\"                            # Red5 Pro server cloud storage - Gogle storage account access key\n  standalone_red5pro_google_storage_secret_access_key    = \"\"                            # Red5 Pro server cloud storage - Gogle storage account secret access key\n  standalone_red5pro_google_storage_bucket_name          = \"\"                            # Red5 Pro server cloud storage - Gogle storage bucket name\n  standalone_red5pro_cloudstorage_postprocessor_enable   = false                         # Red5 Pro server cloud storage - enable/disable Red5 Pro server postprocessor (https://www.red5.net/docs/special/cloudstorage-plugin/server-configuration/) \n\n  # Standalone Red5 Pro server HTTPS (SSL) certificate configuration\n  https_ssl_certificate = \"none\" # none - do not use HTTPS/SSL certificate, letsencrypt - create new Let's Encrypt HTTPS/SSL certificate, imported - use existing HTTPS/SSL certificate\n\n  # # Example of Let's Encrypt HTTPS/SSL certificate configuration - please uncomment and provide your domain name and email\n  # https_ssl_certificate                       = \"letsencrypt\"\n  # https_ssl_certificate_domain_name           = \"red5pro.example.com\"\n  # https_ssl_certificate_email                 = \"email@example.com\"\n\n  # # Example of imported HTTPS/SSL certificate configuration - please uncomment and provide your domain name, certificate and key paths\n  # https_ssl_certificate                       = \"imported\"\n  # https_ssl_certificate_domain_name           = \"red5pro.example.com\"\n  # https_ssl_certificate_cert_path             = \"/PATH/TO/SSL/CERT/fullchain.pem\"\n  # https_ssl_certificate_key_path              = \"/PATH/TO/SSL/KEY/privkey.pem\"\n}\n\noutput \"module_output\" {\n  value = module.red5pro\n}\n```\n\n## Red5 Pro Stream Manager cluster deployment (cluster) - [Example](https://github.com/red5pro/terraform-gcp-red5pro/tree/master/examples/cluster)\n\nIn the following example, Terraform module will automates the infrastructure provisioning of the Stream Manager 2.0 cluster with Red5 Pro (SM2.0) Autoscaling node group (origins, edges, transcoders, relays)\n\n### Terraform Deployed Resources (cluster)\n\n- VPC\n- Public Subnet\n- Cloud Router \n- Firewall Rules\n  - Stream Manager 2.0\n  - Kafka\n  - Red5 Pro (SM2.0) Autoscaling Nodes\n- SSH key pair (use existing or create a new one)\n- Standalone Kafka instance\n- Autoscaling configuration for Nodegroup instances\n- HTTP(S) Load Balancer for Stream Manager 2.0 instances\n- SSL Certificate for HTTP(S) Load Balancer:\n  - `none`: Load Balancer without HTTPS and SSL certificate (HTTP on port `80`)\n  - `letsencrypt`: Stream Manager 2.0 with HTTPS and SSL certificate obtained by Let's Encrypt. HTTP on port `80`, HTTPS on port `443`\n  - `imported`: Load Balancer with HTTPS using an imported SSL certificate (HTTP on port `80`, HTTPS on port `443`)\n- Red5 Pro (SM2.0) Node instance image (origins, edges, transcoders, relays)\n- Red5 Pro (SM2.0) Autoscaling Node group (origins, edges, transcoders, relays)\n\n#### Example main.tf (cluster)\n\n```yaml\nprovider \"google\" {\n  project = \"example-gcp-project-name\" # Google Cloud project ID (https://support.google.com/googleapi/answer/7014113?hl=en)\n}\n\nmodule \"red5pro\" {\n  source            = \"red5pro/red5pro/gcp\"\n  google_region     = \"us-west2\"                 # Google region where resources will create eg: us-west2\n  google_project_id = \"example-gcp-project-name\" # Google Cloud project ID (https://support.google.com/googleapi/answer/7014113?hl=en)\n\n  ubuntu_version        = \"22.04\"                                 # The version of ubuntu which is used to create Instance, it can either be 20.04 or 22.04\n  type                  = \"cluster\"                               # Deployment type: standalone, cluster, autoscale\n  name                  = \"red5pro-cluster\"                       # Name to be used on all the resources as identifier\n  path_to_red5pro_build = \"./red5pro-server-0.0.0.b0-release.zip\" # Absolute path or relative path to Red5 Pro server ZIP file\n\n  # SSH key configuration\n  ssh_key_use_existing              = false                                               # Use existing SSH key pair or create a new one. true = use existing, false = create new SSH key pair\n  ssh_key_public_key_path_existing  = \"/PATH/TO/EXISTING/SSH/PRIVATE/KEY/example_key.pub\" # SSH public key path existing in local machine\n  ssh_key_private_key_path_existing = \"/PATH/TO/EXISTING/SSH/PRIVATE/KEY/example_key.pem\" # SSH private key path existing in local machine\n\n  # VPC configuration\n  vpc_use_existing  = false              # true - use existing VPC, false - create new VPC in Google Cloud\n  vpc_name_existing = \"example-vpc-name\" # VPC ID for existing VPC\n\n  # Firewall configuration\n  firewall_ssh_allowed_ip_ranges                    = [\"0.0.0.0/0\"]                      # List of IP address ranges to provide SSH connection with Red5 Pro instances. Kindly provide your public IP to make SSH connection while running this terraform module\n  firewall_stream_manager_network_tags_use_existing = false                              # true - use existing firewall network tags, false - create new firewall network tags\n  firewall_stream_manager_network_tags_existing     = [\"example-tag-1\", \"example-tag-2\"] # Existing network tags name for firewall configuration\n  firewall_kafka_network_tags_use_existing          = false                              # true - use existing firewall network tags, false - create new firewall network tags\n  firewall_kafka_network_tags_existing              = [\"example-tag-1\", \"example-tag-2\"] # Existing network tags name for firewall configuration\n  firewall_nodes_network_tags_use_existing          = false                              # true - use existing firewall network tags, false - create new firewall network tags\n  firewall_nodes_network_tags_existing              = [\"example-tag-1\", \"example-tag-2\"] # Existing network tags name for firewall configuration\n\n  # Red5 Pro general configuration\n  red5pro_license_key = \"1111-2222-3333-4444\" # Red5 Pro license key (https://account.red5.net/login)\n  red5pro_api_enable  = true                  # true - enable Red5 Pro server API, false - disable Red5 Pro server API (https://www.red5.net/docs/development/api/overview/)\n  red5pro_api_key     = \"examplekey\"          # Red5 Pro server API key (https://www.red5.net/docs/development/api/overview/)\n\n  # Kafka Service configuration\n  kafka_standalone_instance_create = false           # true - Create a dedicate kafka service instance, false - install kafka service locally on the stream manager\n  kafka_standalone_instance_type   = \"n2-standard-2\" # Kafka service Instance type\n  kafka_standalone_disk_type       = \"pd-ssd\"        # Boot disk type for Kafka server. Possible values are `pd-ssd`, `pd-standard`, `pd-balanced`\n  kafka_standalone_disk_size       = 24              # Kafka server boot size in GB\n\n  # Stream Manager configuration\n  stream_manager_auth_user     = \"example_user\"     # Stream Manager 2.0 authentication user name\n  stream_manager_auth_password = \"example_password\" # Stream Manager 2.0 authentication password\n  stream_manager_proxy_user    = \"example_proxy_user\"       # Stream Manager 2.0 proxy user name\n  stream_manager_proxy_password   = \"example_proxy_password\"   # Stream Manager 2.0 proxy password\n  stream_manager_spatial_user     = \"example_spatial_user\"     # Stream Manager 2.0 spatial user name\n  stream_manager_spatial_password = \"example_spatial_password\" # Stream Manager 2.0 spatial password\n  stream_manager_version          = \"latest\"                   # Stream Manager 2.0 docker images version (latest, 14.1.0, 14.1.1, etc.) - https://hub.docker.com/r/red5pro/as-admin/tags\n  stream_manager_instance_type = \"n2-standard-2\"    # Instance type for Red5 Pro stream manager server\n  stream_manager_disk_type     = \"pd-ssd\"           # Boot disk type for Stream Manager server. Possible values are `pd-ssd`, `pd-standard`, `pd-balanced`\n  stream_manager_disk_size     = 24                 # Stream Manager server boot size in GB\n\n  stream_manager_reserved_ip_use_existing  = false                 # True - Use already created reserved IP address for stream manager, False - Create a new reserved IP for stream manager\n  stream_manager_reserved_ip_name_existing = \"example-reserved-ip\" # Reserved IP name for existing reserved IP address\n\n  # Stream Manager 2.0 HTTPS (SSL) certificate configuration\n  https_ssl_certificate = \"none\" # none - do not use HTTPS/SSL certificate, letsencrypt - create new Let's Encrypt HTTPS/SSL certificate, imported - use existing HTTPS/SSL certificate\n\n  # # Example of Let's Encrypt HTTPS/SSL certificate configuration - please uncomment and provide your domain name and email\n  # https_ssl_certificate                    = \"letsencrypt\"\n  # https_ssl_certificate_domain_name        = \"red5pro.example.com\"\n  # https_ssl_certificate_email              = \"email@example.com\"\n\n  # # Example of imported HTTPS/SSL certificate configuration - please uncomment and provide your domain name, certificate and key paths\n  # https_ssl_certificate                    = \"imported\"\n  # https_ssl_certificate_domain_name        = \"red5pro.example.com\"\n  # https_ssl_certificate_cert_path          = \"/PATH/TO/SSL/CERT/fullchain.pem\"\n  # https_ssl_certificate_key_path           = \"/PATH/TO/SSL/KEY/privkey.pem\"\n\n  # Red5 Pro cluster node image configuration\n  node_image_create        = true            # Default: true for Autoscaling and Cluster, true - create new node image, false - not create new node image\n  node_image_instance_type = \"n2-standard-2\" # Instance type for the Red5 Pro Node server\n  node_image_disk_type     = \"pd-ssd\"        # Boot disk type for Node server. Possible values are `pd-ssd`, `pd-standard`, `pd-balanced`\n  node_image_disk_size     = 10              # Boot disk size for Node server\n\n  # Extra configuration for Red5 Pro autoscaling nodes\n  # Webhooks configuration - (Optional) https://www.red5.net/docs/special/webhooks/overview/\n  node_config_webhooks = {\n    enable           = false,\n    target_nodes     = [\"origin\", \"edge\", \"transcoder\"],\n    webhook_endpoint = \"https://test.webhook.app/api/v1/broadcast/webhook\"\n  }\n  # Round trip authentication configuration - (Optional) https://www.red5.net/docs/special/authplugin/simple-auth/\n  node_config_round_trip_auth = {\n    enable                   = false,\n    target_nodes             = [\"origin\", \"edge\", \"transcoder\"],\n    auth_host                = \"round-trip-auth.example.com\",\n    auth_port                = 443,\n    auth_protocol            = \"https://\",\n    auth_endpoint_validate   = \"/validateCredentials\",\n    auth_endpoint_invalidate = \"/invalidateCredentials\"\n  }\n  # Restreamer configuration - (Optional) https://www.red5.net/docs/special/restreamer/overview/\n  node_config_restreamer = {\n    enable               = false,\n    target_nodes         = [\"origin\", \"transcoder\"],\n    restreamer_tsingest  = true,\n    restreamer_ipcam     = true,\n    restreamer_whip      = true,\n    restreamer_srtingest = true\n  }\n  # Social Pusher configuration - (Optional) https://www.red5.net/docs/development/social-media-plugin/rest-api/\n  node_config_social_pusher = {\n    enable       = false,\n    target_nodes = [\"origin\", \"edge\", \"transcoder\"],\n  }\n\n  # Red5 Pro autoscaling Node group\n  node_group_create                    = true            # Linux or Mac OS only. true - create new Node group, false - not create new Node group\n  node_group_origins_min               = 1               # Number of minimum Origins\n  node_group_origins_max               = 10              # Number of maximum Origins\n  node_group_origins_instance_type     = \"n2-standard-2\" # Origins google instance type\n  node_group_origins_disk_size         = 16              # Disk size for Origins\n  node_group_origins_connection_limit  = 20              # Maximum number of publishers to the origin server\n  node_group_edges_min                 = 1               # Number of minimum Edges\n  node_group_edges_max                 = 20              # Number of maximum Edges\n  node_group_edges_instance_type       = \"n2-standard-2\" # Edges google instance type\n  node_group_edges_disk_size           = 16              # Disk size for Edges\n  node_group_edges_connection_limit    = 200             # Maximum number of subscribers to the edge server\n  node_group_transcoders_min           = 0               # Number of minimum Transcoders\n  node_group_transcoders_max           = 10              # Number of maximum Transcoders\n  node_group_transcoders_instance_type = \"n2-standard-2\" # Transcoders google instance type\n  node_group_transcoders_disk_size     = 16              # Disk size for Transcoders\n  node_group_transcoders_connection_limit = 20           # Maximum number of publishers to the transcoder server\n  node_group_relays_min                = 0               # Number of minimum Relays\n  node_group_relays_max                = 20              # Number of maximum Relays\n  node_group_relays_instance_type      = \"n2-standard-2\" # Relays google instance type\n  node_group_relays_disk_size          = 16              # Disk size for Relays\n}\n```\n\n## Red5 Pro Stream Manager autoscale deployment (autoscale) - [Example](https://github.com/red5pro/terraform-gcp-red5pro/tree/master/examples/autoscale)\n\nIn the following example, Terraform module will automates the infrastructure provisioning of the Autoscale Stream Managers 2.0 with Red5 Pro (SM2.0) Autoscaling node group (origins, edges, transcoders, relays)\n\n### Terraform Deployed Resources (autoscale)\n\n- VPC\n- Public Subnet\n- Cloud Router \n- Firewall Rules\n  - Stream Manager 2.0\n  - Kafka\n  - Red5 Pro (SM2.0) Autoscaling Nodes\n- SSH key pair (use existing or create a new one)\n- Standalone Kafka instance\n- Stream Manager 2.0 instance image\n- Instance pool for Stream Manager 2.0 instances\n- Autoscaling configuration for Stream Manager 2.0 instances\n- HTTP(S) Load Balancer for Stream Manager 2.0 instances\n- SSL Certificate for HTTP(S) Load Balancer. Options:\n  - `none` - HTTP(S) Load Balancer without HTTPS and SSL certificate. Only HTTP on port `80`.\n  - `imported` - HTTP(S) Load Balancer with HTTPS and an imported SSL certificate in Google Cloud Certificate Manager. HTTP on port `80`, HTTPS on port `443`.\n  - `existing` - HTTP(S) Load Balancer with HTTPS using an existing SSL certificate in Google Cloud Certificate Manager. HTTP on port `80`, HTTPS on port `443`.\n- Red5 Pro (SM2.0) Node instance image (origins, edges, transcoders, relays)\n- Red5 Pro (SM2.0) Autoscaling Node group (origins, edges, transcoders, relay)\n\n#### Example main.tf (autoscale)\n\n```yaml\nprovider \"google\" {\n  project = \"example-gcp-project-name\" # Google Cloud project ID (https://support.google.com/googleapi/answer/7014113?hl=en)\n}\n\nmodule \"red5pro\" {\n  source            = \"red5pro/red5pro/gcp\"\n  google_region     = \"us-west2\"                 # Google region where resources will create eg: us-west2\n  google_project_id = \"example-gcp-project-name\" # Google Cloud project ID (https://support.google.com/googleapi/answer/7014113?hl=en)\n\n  ubuntu_version        = \"22.04\"                                 # The version of ubuntu which is used to create Instance, it can either be 20.04 or 22.04\n  type                  = \"autoscale\"                             # Deployment type: standalone, cluster, autoscale\n  name                  = \"red5pro-autoscale\"                     # Name to be used on all the resources as identifier\n  path_to_red5pro_build = \"./red5pro-server-0.0.0.b0-release.zip\" # Absolute path or relative path to Red5 Pro server ZIP file\n\n  # SSH key configuration\n  ssh_key_use_existing              = false                                               # Use existing SSH key pair or create a new one. true = use existing, false = create new SSH key pair\n  ssh_key_public_key_path_existing  = \"/PATH/TO/EXISTING/SSH/PRIVATE/KEY/example_key.pub\" # SSH public key path existing in local machine\n  ssh_key_private_key_path_existing = \"/PATH/TO/EXISTING/SSH/PRIVATE/KEY/example_key.pem\" # SSH private key path existing in local machine\n\n  # VPC configuration\n  vpc_use_existing  = false              # true - use existing VPC, false - create new VPC in Google Cloud\n  vpc_name_existing = \"example-vpc-name\" # VPC ID for existing VPC\n\n  # Firewall configuration\n  firewall_ssh_allowed_ip_ranges                    = [\"0.0.0.0/0\"]                      # List of IP address ranges to provide SSH connection with Red5 Pro instances. Kindly provide your public IP to make SSH connection while running this terraform module\n  firewall_stream_manager_network_tags_use_existing = false                              # true - use existing firewall network tags, false - create new firewall network tags\n  firewall_stream_manager_network_tags_existing     = [\"example-tag-1\", \"example-tag-2\"] # Existing network tags name for firewall configuration\n  firewall_kafka_network_tags_use_existing          = false                              # true - use existing firewall network tags, false - create new firewall network tags\n  firewall_kafka_network_tags_existing              = [\"example-tag-1\", \"example-tag-2\"] # Existing network tags name for firewall configuration\n  firewall_nodes_network_tags_use_existing          = false                              # true - use existing firewall network tags, false - create new firewall network tags\n  firewall_nodes_network_tags_existing              = [\"example-tag-1\", \"example-tag-2\"] # Existing network tags name for firewall configuration\n\n  # Red5 Pro general configuration\n  red5pro_license_key = \"1111-2222-3333-4444\" # Red5 Pro license key (https://account.red5.net/login)\n  red5pro_api_enable  = true                  # true - enable Red5 Pro server API, false - disable Red5 Pro server API (https://www.red5.net/docs/development/api/overview/)\n  red5pro_api_key     = \"examplekey\"          # Red5 Pro server API key (https://www.red5.net/docs/development/api/overview/)\n\n  # Kafka Service configuration\n  kafka_standalone_instance_type = \"n2-standard-2\" # Kafka service Instance type\n  kafka_standalone_disk_type     = \"pd-ssd\"        # Boot disk type for Kafka server. Possible values are `pd-ssd`, `pd-standard`, `pd-balanced`\n  kafka_standalone_disk_size     = 24              # Kafka server boot size in GB\n\n  # Stream Manager configuration\n  stream_manager_auth_user                = \"example_user\"     # Stream Manager 2.0 authentication user name\n  stream_manager_auth_password            = \"example_password\" # Stream Manager 2.0 authentication password\n  stream_manager_proxy_user               = \"example_proxy_user\"       # Stream Manager 2.0 proxy user name\n  stream_manager_proxy_password           = \"example_proxy_password\"   # Stream Manager 2.0 proxy password\n  stream_manager_spatial_user             = \"example_spatial_user\"     # Stream Manager 2.0 spatial user name\n  stream_manager_spatial_password         = \"example_spatial_password\" # Stream Manager 2.0 spatial password\n  stream_manager_version                  = \"latest\"                   # Stream Manager 2.0 docker images version (latest, 14.1.0, 14.1.1, etc.) - https://hub.docker.com/r/red5pro/as-admin/tags\n  stream_manager_instance_type            = \"n2-standard-2\"    # Instance type for Red5 Pro stream manager server\n  stream_manager_disk_type                = \"pd-ssd\"           # Boot disk type for Stream Manager server. Possible values are `pd-ssd`, `pd-standard`, `pd-balanced`\n  stream_manager_disk_size                = 24                 # Stream Manager server boot size in GB\n  stream_manager_autoscaling_min_replicas = 1                  # Minimum capacity for Stream Manager autoscaling group\n  stream_manager_autoscaling_max_replicas = 2                  # Maximum capacity for Stream Manager autoscaling group\n\n  # Load Balancer Configuration\n  lb_global_reserved_ip_use_existing  = false                 # True - Use already created reserved IP address for Load Balancer, False - Create a new reserved IP for Load Balancer\n  lb_global_reserved_ip_name_existing = \"example-reserved-ip\" # If `lb_global_reserved_ip_use_existing` - True, Use the already created Load balancer IP address name\n\n  # Stream Manager 2.0 Load Balancer HTTPS (SSL) certificate configuration\n  https_ssl_certificate = \"none\" # none - do not use HTTPS/SSL certificate, imported - import existing HTTPS/SSL certificate, existing - use existing HTTPS/SSL certificate in GCP\n\n  # Example of imported HTTPS/SSL certificate configuration - please uncomment and provide your domain name, certificate and key paths\n  # https_ssl_certificate           = \"imported\"                 # Improt local HTTPS/SSL certificate to AWS ACM\n  # https_ssl_certificate_name      = \"example-certificate-name\" # Name of the HTTPS/SSL certificate\n  # https_ssl_certificate_cert_path = \"/PATH/TO/SSL/CERT/fullchain.pem\"\n  # https_ssl_certificate_key_path  = \"/PATH/TO/SSL/KEY/privkey.pem\"\n\n  # Example of existing HTTPS/SSL certificate configuration - please uncomment and provide your domain name\n  # https_ssl_certificate      = \"existing\"                 # Use existing HTTPS/SSL certificate in GCP\n  # https_ssl_certificate_name = \"example-certificate-name\" # Replace with your domain name\n\n  # Red5 Pro cluster node image configuration\n  node_image_create        = true            # Default: true for Autoscaling and Cluster, true - create new node image, false - not create new node image\n  node_image_instance_type = \"n2-standard-2\" # Instance type for the Red5 Pro Node server\n  node_image_disk_type     = \"pd-ssd\"        # Boot disk type for Node server. Possible values are `pd-ssd`, `pd-standard`, `pd-balanced`\n  node_image_disk_size     = 10              # Boot disk size for Node server\n\n  # Extra configuration for Red5 Pro autoscaling nodes\n  # Webhooks configuration - (Optional) https://www.red5.net/docs/special/webhooks/overview/\n  node_config_webhooks = {\n    enable           = false,\n    target_nodes     = [\"origin\", \"edge\", \"transcoder\"],\n    webhook_endpoint = \"https://test.webhook.app/api/v1/broadcast/webhook\"\n  }\n  # Round trip authentication configuration - (Optional) https://www.red5.net/docs/special/authplugin/simple-auth/\n  node_config_round_trip_auth = {\n    enable                   = false,\n    target_nodes             = [\"origin\", \"edge\", \"transcoder\"],\n    auth_host                = \"round-trip-auth.example.com\",\n    auth_port                = 443,\n    auth_protocol            = \"https://\",\n    auth_endpoint_validate   = \"/validateCredentials\",\n    auth_endpoint_invalidate = \"/invalidateCredentials\"\n  }\n  # Restreamer configuration - (Optional) https://www.red5.net/docs/special/restreamer/overview/\n  node_config_restreamer = {\n    enable               = false,\n    target_nodes         = [\"origin\", \"transcoder\"],\n    restreamer_tsingest  = true,\n    restreamer_ipcam     = true,\n    restreamer_whip      = true,\n    restreamer_srtingest = true\n  }\n  # Social Pusher configuration - (Optional) https://www.red5.net/docs/development/social-media-plugin/rest-api/\n  node_config_social_pusher = {\n    enable       = false,\n    target_nodes = [\"origin\", \"edge\", \"transcoder\"],\n  }\n\n  # Red5 Pro autoscaling Node group\n  node_group_create                    = true            # Linux or Mac OS only. true - create new Node group, false - not create new Node group\n  node_group_origins_min               = 1               # Number of minimum Origins\n  node_group_origins_max               = 10              # Number of maximum Origins\n  node_group_origins_instance_type     = \"n2-standard-2\" # Origins google instance type\n  node_group_origins_disk_size         = 16              # Disk size for Origins\n  node_group_origins_connection_limit  = 20              # Maximum number of publishers to the origin server\n  node_group_edges_min                 = 1               # Number of minimum Edges\n  node_group_edges_max                 = 20              # Number of maximum Edges\n  node_group_edges_instance_type       = \"n2-standard-2\" # Edges google instance type\n  node_group_edges_disk_size           = 16              # Disk size for Edges\n  node_group_edges_connection_limit    = 200             # Maximum number of subscribers to the edge server\n  node_group_transcoders_min           = 0               # Number of minimum Transcoders\n  node_group_transcoders_max           = 10              # Number of maximum Transcoders\n  node_group_transcoders_instance_type = \"n2-standard-2\" # Transcoders google instance type\n  node_group_transcoders_disk_size     = 16              # Disk size for Transcoders\n  node_group_transcoders_connection_limit = 20           # Maximum number of publishers to the transcoder server\n  node_group_relays_min                = 0               # Number of minimum Relays\n  node_group_relays_max                = 20              # Number of maximum Relays\n  node_group_relays_instance_type      = \"n2-standard-2\" # Relays google instance type\n  node_group_relays_disk_size          = 16              # Disk size for Relays\n}\n```\n\n---\n\n**NOTES**\n\n\u003e - WebRTC broadcast does not work in WEB browsers without an HTTPS (SSL) certificate.\n\u003e - To activate HTTPS/SSL, you need to add a DNS A record for the Public/Reserved IP address of your Red5 Pro server or Stream Manager 2.0.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fred5pro%2Fterraform-gcp-red5pro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fred5pro%2Fterraform-gcp-red5pro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fred5pro%2Fterraform-gcp-red5pro/lists"}