2025-08-28 18:13:40 +02:00
# ------------------------- variables -------------------------
# Variables used by the configuration
variable " projectId " {
2025-09-16 13:09:16 +02:00
description = " GCP project id where the resourw es will be created. "
2025-08-28 18:13:40 +02:00
type = string
}
variable " region " {
2025-09-16 13:09:16 +02:00
description = " GCP region where resources will be created. "
2025-08-28 18:13:40 +02:00
type = string
default = " europe-west1 "
}
variable " zone " {
2025-09-16 13:09:16 +02:00
description = " GCP zone that some resources will use. "
2025-08-28 18:13:40 +02:00
type = string
default = " europe-west1-b "
}
variable " stackName " {
2025-09-16 13:09:16 +02:00
description = " Stack name for OpenVidu deployment. "
2025-08-28 18:13:40 +02:00
type = string
}
variable " certificateType " {
2025-09-16 13:09:16 +02:00
description = " [selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option. [owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option. [letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, a random sslip.io domain will be used). "
2025-08-28 18:13:40 +02:00
type = string
2025-09-05 16:48:26 +02:00
default = " letsencrypt "
2025-08-28 18:13:40 +02:00
validation {
condition = contains ( [ " selfsigned " , " owncert " , " letsencrypt " ] , var . certificateType )
error_message = " certificateType must be one of: selfsigned, owncert, letsencrypt "
}
}
2025-09-05 16:48:26 +02:00
variable " publicIpAddress " {
2025-09-16 13:09:16 +02:00
description = " Previously created Public IP address for the OpenVidu Deployment. Blank will generate a public IP. "
2025-08-28 18:13:40 +02:00
type = string
default = " "
2025-09-16 13:09:16 +02:00
validation {
condition = can ( regex ( " ^ $ |^([01]? \\ d{1,2}|2[0-4] \\ d|25[0-5]) \\ .([01]? \\ d{1,2}|2[0-4] \\ d|25[0-5]) \\ .([01]? \\ d{1,2}|2[0-4] \\ d|25[0-5]) \\ .([01]? \\ d{1,2}|2[0-4] \\ d|25[0-5]) $ " , var . publicIpAddress ) )
error_message = " The Public Elastic IP does not have a valid IPv4 format "
}
2025-08-28 18:13:40 +02:00
}
variable " domainName " {
2025-09-16 13:09:16 +02:00
description = " Domain name for the OpenVidu Deployment. "
2025-08-28 18:13:40 +02:00
type = string
default = " "
2025-09-16 13:09:16 +02:00
validation {
condition = can ( regex ( " ^ $ |^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])? \\ .)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9] $ " , var . domainName ) )
error_message = " The domain name does not have a valid domain name format "
}
2025-08-28 18:13:40 +02:00
}
variable " ownPublicCertificate " {
2025-09-16 13:09:16 +02:00
description = " If certificate type is 'owncert', this parameter will be used to specify the public certificate "
2025-08-28 18:13:40 +02:00
type = string
default = " "
}
variable " ownPrivateCertificate " {
2025-09-16 13:09:16 +02:00
description = " If certificate type is 'owncert', this parameter will be used to specify the private certificate "
type = string
default = " "
}
variable " initialMeetAdminPassword " {
description = " Initial password for the 'admin' user in OpenVidu Meet. If not provided, a random password will be generated. "
type = string
default = " "
validation {
condition = can ( regex ( " ^[A-Za-z0-9_-]* $ " , var . initialMeetAdminPassword ) )
error_message = " Must contain only alphanumeric characters (A-Z, a-z, 0-9). Leave empty to generate a random password. "
}
}
variable " initialMeetApiKey " {
description = " Initial API key for OpenVidu Meet. If not provided, no API key will be set and the user can set it later from Meet Console. "
2025-08-28 18:13:40 +02:00
type = string
default = " "
2025-09-16 13:09:16 +02:00
validation {
condition = can ( regex ( " ^[A-Za-z0-9_-]* $ " , var . initialMeetApiKey ) )
error_message = " Must contain only alphanumeric characters (A-Z, a-z, 0-9). Leave empty to not set an initial API key. "
}
2025-08-28 18:13:40 +02:00
}
2025-09-01 18:53:34 +02:00
variable " additionalInstallFlags " {
2025-09-16 13:09:16 +02:00
description = " Additional optional flags to pass to the OpenVidu installer (comma-separated, e.g.,'--flag1=value, --flag2'). "
2025-08-28 18:13:40 +02:00
type = string
default = " "
2025-09-16 13:09:16 +02:00
validation {
condition = can ( regex ( " ^[A-Za-z0-9, =_. \\ -]* $ " , var . additionalInstallFlags ) )
error_message = " Must be a comma-separated list of flags (for example, --flag=value, --bool-flag). "
}
2025-08-28 18:13:40 +02:00
}
variable " turnDomainName " {
2025-09-16 13:09:16 +02:00
description = " (Optional) Domain name for the TURN server with TLS. Only needed if your users are behind restrictive firewalls "
2025-08-28 18:13:40 +02:00
type = string
default = " "
}
variable " turnOwnPublicCertificate " {
2025-09-16 13:09:16 +02:00
description = " (Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified. "
2025-08-28 18:13:40 +02:00
type = string
default = " "
}
variable " turnOwnPrivateCertificate " {
2025-09-16 13:09:16 +02:00
description = " (Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified. "
2025-08-28 18:13:40 +02:00
type = string
default = " "
}
variable " instanceType " {
2025-09-16 13:09:16 +02:00
description = " Specifies the GCE machine type for your OpenVidu instance "
2025-08-28 18:13:40 +02:00
type = string
default = " e2-standard-8 "
2025-09-16 13:09:16 +02:00
validation {
condition = can ( regex ( " ^(e2-(micro|small|medium|standard-[2-9]|standard-1[0-6]|highmem-[2-9]|highmem-1[0-6]|highcpu-[2-9]|highcpu-1[0-6])|n1-(standard-[1-9]|standard-[1-9][0-9]|highmem-[2-9]|highmem-[1-9][0-9]|highcpu-[1-9]|highcpu-[1-9][0-9])|n2-(standard-[2-9]|standard-[1-9][0-9]|standard-1[0-2][0-8]|highmem-[2-9]|highmem-[1-9][0-9]|highmem-1[0-2][0-8]|highcpu-[1-9][0-9]|highcpu-1[0-2][0-8])|n2d-(standard-[2-9]|standard-[1-9][0-9]|standard-2[0-2][0-4]|highmem-[2-9]|highmem-[1-9][0-9]|highmem-9[0-6]|highcpu-[1-9][0-9]|highcpu-2[0-2][0-4])|c2-(standard-[4-9]|standard-[1-5][0-9]|standard-60)|c2d-(standard-[2-9]|standard-[1-9][0-9]|standard-1[0-1][0-2]|highmem-[2-9]|highmem-[1-9][0-9]|highmem-1[0-1][0-2]|highcpu-[1-9][0-9]|highcpu-1[0-1][0-2])|m1-(ultramem-[4-9][0-9]|ultramem-160)|m2-(ultramem-208|ultramem-416|megamem-416)|m3-(ultramem-32|ultramem-64|ultramem-128|megamem-64|megamem-128)|a2-(standard-[1-9]|standard-[1-9][0-9]|standard-96|highmem-1g|ultramem-1g|megamem-1g)|a3-(standard-[1-9]|standard-[1-9][0-9]|standard-80|highmem-1g|megamem-1g)|g2-(standard-[4-9]|standard-[1-9][0-9]|standard-96)|t2d-(standard-[1-9]|standard-[1-9][0-9]|standard-60)|t2a-(standard-[1-9]|standard-[1-9][0-9]|standard-48)|h3-(standard-88)|f1-(micro)|t4g-(micro|small|medium|standard-[1-9]|standard-[1-9][0-9])) $ " , var . instanceType ) )
error_message = " The instance type is not valid "
}
2025-08-28 18:13:40 +02:00
}
variable " bucketName " {
2025-09-16 13:09:16 +02:00
description = " Name of the S3 bucket to store data and recordings. If empty, a bucket will be created "
2025-09-09 17:22:09 +02:00
type = string
default = " "
}