{"id":26802395,"url":"https://github.com/red5pro/terraform-aws-red5pro","last_synced_at":"2026-02-25T17:23:55.359Z","repository":{"id":187686422,"uuid":"617561429","full_name":"red5pro/terraform-aws-red5pro","owner":"red5pro","description":"Terraform module for Red5 Pro in AWS","archived":false,"fork":false,"pushed_at":"2025-02-20T16:43:00.000Z","size":328,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-20T17:38:09.676Z","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":"2023-03-22T16:35:42.000Z","updated_at":"2025-02-20T16:41:42.000Z","dependencies_parsed_at":"2023-08-11T18:56:55.291Z","dependency_job_id":"881a9143-1fdf-45fe-945d-966d7600eebf","html_url":"https://github.com/red5pro/terraform-aws-red5pro","commit_stats":null,"previous_names":["red5pro/terraform-aws-red5pro"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/red5pro%2Fterraform-aws-red5pro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/red5pro%2Fterraform-aws-red5pro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/red5pro%2Fterraform-aws-red5pro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/red5pro%2Fterraform-aws-red5pro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/red5pro","download_url":"https://codeload.github.com/red5pro/terraform-aws-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:58.303Z","updated_at":"2026-01-07T22:45:45.487Z","avatar_url":"https://github.com/red5pro.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform Module for Deploying Red5 Pro Amazon Cloud Infrastructure (AWS) - 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 is a reusable Terraform module that provisions infrastructure on [Amazon Cloud Infrastructure (AWS)](https://aws.amazon.com/console/).\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 Amazon Cloud Infrastructure (AWS) CLI\n\n- [Installing the CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)\n\n\u003e Install the AWS CLI on the same machine/instance where you run this Terraform module and ensure it is configured:\n\u003e - If running on AWS EC2 with an IAM instance profile, no explicit credentials are required (the CLI and providers will use the instance role automatically).\n\u003e - If running outside AWS or without an instance profile, configure a profile:\n\u003e   - `aws configure --profile myprofile`\n\u003e   - Then set `AWS_PROFILE=myprofile` (or pass `profile` in your provider if using examples).\n\n### Prepare AWS account\n\n- Preferred: Use IAM roles (instance profile for EC2, task role for ECS) for all Terraform and runtime operations. This module supports running entirely with instance profiles and does not require static access keys when executed on AWS.\n\n- If static AWS access keys must be used, they must comply with the following requirements (per AWS security guidance):\n  - Must only be used by humans to access AWS services and stored securely.\n  - If used by a service, ALL of the conditions below must be met:\n    - Not feasible to use EC2 instance role, ECS task role, or a similar mechanism.\n    - Keys must be rotated at least weekly.\n    - IAM policies must be tightly scoped to the minimum required permissions.\n    - Access must be restricted by source IPs (deny all except Partner-approved IP addresses).\n  - We strongly recommend migrating to IAM roles wherever possible to remove static credentials.\n\n- Minimum AWS permissions this module may require (depending on selected features):\n  - VPC, Subnets, Route Tables, Internet Gateways\n  - EC2 Instances, AMIs, Security Groups, Key Pairs, EBS Volumes/Snapshots, Placement Groups\n  - IAM to create and attach Role/Policy for Stream Manager (instance profile)\n  - Autoscaling (if autoscale features are enabled)\n  - Elastic Load Balancing and ACM (if HTTPS/ALB is enabled)\n  - Route53 (if DNS automation is enabled)\n\n## This module supports three variants of Red5 Pro deployments\n\n- **standalone** - Standalone Red5 Pro server\n- **cluster** - Stream Manager 2.0 cluster with autoscaling nodes\n- **autoscale** - Autoscaling Stream Managers 2.0 with autoscaling nodes\n\n### Standalone Red5 Pro server (standalone) - [Example](https://github.com/red5pro/terraform-aws-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- Internet getaway\n- Route table\n- Security list\n- Security group 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 \"aws\" {\n  region     = \"us-east-1\" # AWS region\n  access_key = \"\"          # AWS IAM Access key\n  secret_key = \"\"          # AWS IAM Secret key\n}\n\nmodule \"red5pro\" {\n  source = \"red5pro/red5pro/aws\"\n  type   = \"standalone\"         # Deployment type: standalone, cluster, autoscale\n  name   = \"red5pro-standalone\" # Name to be used on all the resources as identifier\n\n  ubuntu_version        = \"22.04\"                                 # Ubuntu version for Red5 Pro servers\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_name_existing             = \"example_key\"                                       # SSH key name existing in AWS\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 and subnets, false - create new VPC and subnets automatically\n  vpc_id_existing  = \"vpc-12345\" # VPC ID for existing VPC\n\n  # Elastic IP configuration\n  standalone_elastic_ip_use_existing = false     # true - use existing elastic IP, false - create new elastic IP automatically\n  standalone_elastic_ip_existing     = \"1.2.3.4\" # Existing Elastic IP\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\" # Replace with your domain name\n  # https_ssl_certificate_email       = \"email@example.com\"   # Replace with your email\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\"             # Replace with your domain name\n  # https_ssl_certificate_cert_path   = \"/PATH/TO/SSL/CERT/fullchain.pem\" # Path to cert file or full chain file\n  # https_ssl_certificate_key_path    = \"/PATH/TO/SSL/KEY/privkey.pem\"    # Path to privkey file\n\n  # Standalone Red5 Pro server EC2 instance configuration\n  standalone_instance_type = \"t3.medium\" # Instance type for Red5 Pro server. Example: t3.medium, c5.large, c5.xlarge, c5.2xlarge, c5.4xlarge\n  standalone_volume_size   = 16          # Volume size for Red5 Pro server\n\n  # Red5Pro 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     = \"example_key\"         # Red5 Pro server API key (https://www.red5.net/docs/development/api/overview/)\n\n  # Standalone 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_hls_output_format                   = \"TS\"                                      # HLS output format. Options: TS, FMP4, SMP4\n  standalone_red5pro_hls_dvr_playlist                    = \"false\"                                   # HLS DVR playlist. Options: true, false\n  standalone_red5pro_webhooks_enable                     = false                                     # true - enable Red5 Pro server webhooks, false - disable Red5 Pro server webhooks (https://www.red5.net/docs/special/webhooks/overview/)\n  standalone_red5pro_webhooks_endpoint                   = \"https://example.com/red5/status\"         # Red5 Pro server webhooks endpoint\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                                     # true - enable Red5 Pro server cloud storage, false - disable Red5 Pro server cloud storage (https://www.red5.net/docs/special/cloudstorage-plugin/aws-s3-cloud-storage/)\n  standalone_red5pro_cloudstorage_aws_access_key         = \"\"                                        # AWS access key for Red5 Pro cloud storage (S3 Bucket)\n  standalone_red5pro_cloudstorage_aws_secret_key         = \"\"                                        # AWS secret key for Red5 Pro cloud storage (S3 Bucket)\n  standalone_red5pro_cloudstorage_aws_bucket_name        = \"s3-bucket-example-name\"                  # AWS bucket name for Red5 Pro cloud storage (S3 Bucket)\n  standalone_red5pro_cloudstorage_aws_region             = \"us-east-1\"                               # AWS region for Red5 Pro cloud storage  (S3 Bucket)\n  standalone_red5pro_cloudstorage_postprocessor_enable   = false                                     # true - enable Red5 Pro server postprocessor, false - disable Red5 Pro server postprocessor (https://www.red5.net/docs/special/cloudstorage-plugin/server-configuration/)\n  standalone_red5pro_cloudstorage_aws_bucket_acl_policy  = \"public-read\"                             # AWS bucket ACL policy for Red5 Pro cloud storage (S3 Bucket) Example: none, public-read, authenticated-read, private, public-read-write\n  standalone_red5pro_stream_auto_record_enable           = false                                     # true - enable Red5 Pro server broadcast stream auto record, false - disable Red5 Pro server broadcast stream auto record\n  standalone_red5pro_coturn_enable                       = false                                     # true - enable customized Coturn configuration for Red5Pro server, false - disable customized Coturn configuration for Red5Pro server (https://www.red5.net/docs/installation/turn-stun/turnstun/)\n  standalone_red5pro_coturn_address                      = \"stun:1.2.3.4:3478\"                       # Customized coturn address for Red5Pro server (https://www.red5.net/docs/installation/turn-stun/turnstun/)\n  standalone_red5pro_efs_enable                          = false                                     # enable/disable EFS mount to record streams\n  standalone_red5pro_efs_dns_name                        = \"example.efs.region.amazonaws.com\"        # EFS DNS name\n  standalone_red5pro_efs_mount_point                     = \"/usr/local/red5pro/webapps/live/streams\" # EFS mount point\n  standalone_red5pro_brew_mixer_enable                   = false                                     # true - enable Red5 Pro server brew mixer, false - disable Red5 Pro server brew mixer\n\n  # Red5 Pro tags configuration - it will be added to all Red5 Pro resources\n  tags = {\n    Terraform   = \"true\"\n    Environment = \"dev\"\n    Project     = \"red5pro\"\n  }\n}\n\noutput \"module_output\" {\n  value = module.red5pro\n}\n```\n\n### Stream Manager 2.0 cluster with autoscaling nodes (cluster) - [Example](https://github.com/red5pro/terraform-aws-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- Internet getaway\n- Route table\n- Security list\n    - Security group for Stream Manager 2.0\n    - Security group for Kafka\n    - Security group for Red5 Pro (SM2.0) Autoscaling nodes\n- SSH key pair (use existing or create a new one)\n- Standalone Kafka instance (optional).\n- Stream Manager 2.0 instance. Optionally include a Kafka server on the same instance.\n- SSL certificate for Stream Manager 2.0 instance. Options:\n  - `none` - Stream Manager 2.0 without HTTPS and SSL certificate. Only 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` - Stream Manager 2.0 with HTTPS and 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\u003e Note: For cluster deployments, this module also deploys an AWS IAM Role and IAM Policy that are attached to the Stream Manager EC2 instance via an instance profile. This enables the Stream Manager to authenticate to AWS (without static keys) and run Terraform operations as needed.\n\n#### Example main.tf (cluster)\n\n```yaml\nprovider \"aws\" {\n  region = \"us-east-1\" # AWS region\n}\n\nmodule \"red5pro\" {\n  source                = \"../../\"\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  ubuntu_version        = \"22.04\"                                 # Ubuntu version for Red5 Pro servers\n\n  # AWS authetification variables it use for Stream Manager autoscaling configuration\n  aws_region = \"us-east-1\" # AWS region \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_name_existing             = \"example_key\"                                       # SSH key name existing in AWS\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 and subnets, false - create new VPC and subnets automatically\n  vpc_id_existing  = \"vpc-12345\" # VPC ID for existing VPC\n\n  # Kafka standalone instance configuration\n  kafka_standalone_instance_create = false\n  kafka_standalone_instance_type   = \"m5.xlarge\" # Instance type for Kafka standalone instance\n  kafka_standalone_volume_size     = 16          # Volume size in GB for Kafka standalone instance\n\n  # Stream Manager configuration \n  stream_manager_instance_type    = \"m5.xlarge\"                # Instance type for Stream Manager\n  stream_manager_volume_size      = 16                         # Volume size for Stream Manager\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\n  # Stream Manager Elastic IP configuration\n  stream_manager_elastic_ip_use_existing = false     # true - use existing elastic IP, false - create new elastic IP automatically\n  stream_manager_elastic_ip_existing     = \"1.2.3.4\" # Existing Elastic IP\n\n  # Stream Manager 2.0 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\" # Replace with your domain name\n  # https_ssl_certificate_email       = \"email@example.com\"   # Replace with your email\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\"             # Replace with your domain name\n  # https_ssl_certificate_cert_path   = \"/PATH/TO/SSL/CERT/fullchain.pem\" # Path to cert file or full chain file\n  # https_ssl_certificate_key_path    = \"/PATH/TO/SSL/KEY/privkey.pem\"    # Path to privkey file\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     = \"example_key\"         # Red5 Pro server API key (https://www.red5.net/docs/development/api/overview/)\n\n  # Red5 Pro autoscaling 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 = \"t3.medium\" # Instance type for Node image\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                  = 20          # Number of maximum Origins\n  node_group_origins_instance_type        = \"t3.medium\" # Instance type for Origins\n  node_group_origins_volume_size          = 16          # Volume 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          = \"t3.medium\" # Instance type for Edges\n  node_group_edges_volume_size            = 16          # Volume 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              = 20          # Number of maximum Transcoders\n  node_group_transcoders_instance_type    = \"t3.medium\" # Instance type for Transcoders\n  node_group_transcoders_volume_size      = 16          # Volume 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         = \"t3.medium\" # Instance type for Relays\n  node_group_relays_volume_size           = 16          # Volume size for Relays\n\n  # Red5 Pro tags configuration - it will be added to all Red5 Pro resources\n  tags = {\n    Terraform   = \"true\"\n    Environment = \"dev\"\n    Project     = \"red5pro\"\n  }\n}\n\noutput \"module_output\" {\n  value = module.red5pro\n}\n```\n\n### Autoscaling Stream Managers 2.0 with autoscaling nodes (autoscale) - [Example](https://github.com/red5pro/terraform-aws-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- Internet getaway\n- Route table\n- Security list\n    - Security group for Stream Manager 2.0\n    - Security group for Kafka\n    - Security group for 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 poll for Stream Manager 2.0 instances\n- Autoscaling configuration for Stream Manager 2.0 instances\n- Application Load Balancer for Stream Manager 2.0 instances.\n- SSL certificate for Application Load Balancer. Options:\n  - `none` - Load Balancer without HTTPS and SSL certificate. Only HTTP on port `80`\n  - `imported` - Load Balancer with HTTPS and imported SSL certificate to the AWS Certificate Manager. HTTP on port `80`, HTTPS on port `443`\n  - `existing` - Load Balancer with HTTPS and existing SSL certificate in the AWS 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, relays)\n  \n\u003e Note: For autoscale deployments, this module also deploys an AWS IAM Role and IAM Policy. The role is attached to the initial Stream Manager instance and included in the Launch Template for autoscaled Stream Managers via an instance profile. This allows Terraform operations to run using IAM role credentials inside the Stream Manager containers, eliminating static access keys.\n\n#### Example main.tf (autoscale)\n\n```yaml\nprovider \"aws\" {\n  region = \"us-east-1\" # AWS region\n}\n\nmodule \"red5pro\" {\n  source                = \"../../\"\n  type                  = \"autoscale\"                             # Deployment type: standalone, cluster, autoscale\n  name                  = \"red5pro-auto\"                          # 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  ubuntu_version        = \"22.04\"                                 # Ubuntu version for Red5 Pro servers\n\n  # AWS authetification variables it use for Stream Manager autoscaling configuration\n  aws_region = \"us-east-1\" # AWS region \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_name_existing             = \"example_key\"                                       # SSH key name existing in AWS\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 and subnets, false - create new VPC and subnets automatically\n  vpc_id_existing  = \"vpc-12345\" # VPC ID for existing VPC\n\n  # Kafka standalone instance configuration\n  kafka_standalone_instance_type = \"m5.xlarge\" # Instance type for Kafka standalone instance\n  kafka_standalone_volume_size   = 16          # Volume size in GB for Kafka standalone instance\n\n  # Stream Manager configuration \n  stream_manager_instance_type                = \"m5.xlarge\"                # Instance type for Stream Manager\n  stream_manager_volume_size                  = 16                         # Volume size for Stream Manager\n  stream_manager_autoscaling_desired_capacity = 1                          # Desired capacity for Stream Manager autoscaling group\n  stream_manager_autoscaling_minimum_capacity = 1                          # Minimum capacity for Stream Manager autoscaling group\n  stream_manager_autoscaling_maximum_capacity = 2                          # Maximum capacity for Stream Manager autoscaling group\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\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\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_domain_name    = \"red5pro.example.com\" # Replace with your domain name\n  # https_ssl_certificate_cert_path      = \"./cert.pem\"          # Path to cert file\n  # https_ssl_certificate_key_path       = \"./privkey.pem\"       # Path to privkey file\n  # https_ssl_certificate_fullchain_path = \"./fullchain.pem\"     # Path to full chain file\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 from AWS ACM\n  # https_ssl_certificate_domain_name = \"red5pro.example.com\"  # Replace with your domain name\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     = \"example_key\"         # Red5 Pro server API key (https://www.red5.net/docs/development/api/overview/)\n\n  # Red5 Pro autoscaling 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 = \"t3.medium\" # Instance type for Node image\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                  = 20          # Number of maximum Origins\n  node_group_origins_instance_type        = \"t3.medium\" # Instance type for Origins\n  node_group_origins_volume_size          = 16          # Volume 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          = \"t3.medium\" # Instance type for Edges\n  node_group_edges_volume_size            = 16          # Volume 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              = 20          # Number of maximum Transcoders\n  node_group_transcoders_instance_type    = \"t3.medium\" # Instance type for Transcoders\n  node_group_transcoders_volume_size      = 16          # Volume 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         = \"t3.medium\" # Instance type for Relays\n  node_group_relays_volume_size           = 16          # Volume size for Relays\n\n  # Red5 Pro tags configuration - it will be added to all Red5 Pro resources\n  tags = {\n    Terraform   = \"true\"\n    Environment = \"dev\"\n    Project     = \"red5pro\"\n  }\n}\n\noutput \"module_output\" {\n  value = module.red5pro\n}\n```\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 IP address of your Red5 Pro server or Stream Manager 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fred5pro%2Fterraform-aws-red5pro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fred5pro%2Fterraform-aws-red5pro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fred5pro%2Fterraform-aws-red5pro/lists"}