Unity Accelerator Module¶
Unity Accelerator is a caching service that speeds up project operations in Unity by storing and sharing asset cache data among team members, significantly reducing build times and asset imports by allowing team members to reuse previously processed assets instead of having to process the same assets independently.
This Unity Accelerator deployment uses an Elastic Container Service cluster for task deployment, with Amazon Elastic File System providing persistent storage for configurations and cache. Access is managed through two load balancers: an Application Load Balancer for secure, password-protected web dashboard access via HTTPS, and a Network Load Balancer for efficient cache-related protobuf traffic.
A Secrets Manager password entry, to be used as the Unity Accelerator's web dashboard password, is required beforehand. Password must be stored as a plaintext secret, not as key/value JSON secret, and the password's ARN must be provided as the value for the unity_accelerator_dashboard_password_arn
variable.
Deployment Architecture¶
Examples¶
For example configurations, please see the examples.
Requirements¶
Name | Version |
---|---|
terraform | >= 1.9 |
aws | 5.89.0 |
awscc | 1.34.0 |
random | 3.5.1 |
Providers¶
Name | Version |
---|---|
aws | 5.89.0 |
awscc | 1.48.0 |
random | 3.5.1 |
Modules¶
No modules.
Resources¶
Inputs¶
Name | Description | Type | Default | Required |
---|---|---|---|---|
alb_certificate_arn | The ARN of the SSL certificate to use for the Application Load Balancer. | string |
null |
no |
alb_is_internal | Set this flag to determine whether the Application Load Balancer to create is internal (true) or external (false). Value is ignored if no ALB is created. | bool |
false |
no |
cloudwatch_log_retention_in_days | The log retention in days of the cloudwatch log group for Unity Accelerator. | string |
365 |
no |
cluster_name | The name of the ECS cluster to deploy Unity Accelerator to. | string |
null |
no |
container_cpu | The number of CPU units to allocate to the Unity Accelerator container. | number |
1024 |
no |
container_memory | The number of MB of memory to allocate to the Unity Accelerator container. | number |
4096 |
no |
container_name | The name of the Unity Accelerator container. | string |
"unity-accelerator" |
no |
create_alb | Set this flag to true to create an Application Load Balancer for the Unity Accelerator dashboard. | bool |
true |
no |
create_nlb | Set this flag to true to create an external Network Load Balancer for the Unity Accelerator protobuf traffic. | bool |
true |
no |
debug | Set this flag to enable ECS execute permissions on the Unity Accelerator container and force new service deployments on Terraform apply. | bool |
true |
no |
efs_access_point_id | The ID of the EFS access point to use for the Unity Accelerator data volume. | string |
null |
no |
efs_encryption_enabled | Set this flag to true to enable EFS encryption. | bool |
true |
no |
efs_id | The ID of the EFS file system to use for the Unity Accelerator service. | string |
null |
no |
efs_performance_mode | The performance mode of the EFS file system used by the Unity Accelerator service. Defaults to general purpose. | string |
"generalPurpose" |
no |
efs_throughput_mode | The throughput mode of the EFS file system used by the Unity Accelerator service. Defaults to bursting. | string |
"bursting" |
no |
enable_unity_accelerator_lb_access_logs | Enables access logging for the Application Load Balancer and Network Load Balancer used by Unity Accelerator. Defaults to true. | bool |
true |
no |
enable_unity_accelerator_lb_deletion_protection | Enables deletion protection for the Unity Accelerator Application Load Balancer and Network Load Balancer. Defaults to true. | bool |
true |
no |
environment | The current environment (e.g. dev, prod, etc.) | string |
"dev" |
no |
lb_subnets | The subnets in which the Application Load Balancer and Network Load Balancer will be deployed. | list(string) |
[] |
no |
name | The name applied to resources in the Unity Accelerator module. | string |
"unity-accelerator" |
no |
nlb_is_internal | Set this flag to determine whether the Network Load Balancer to create is internal (true) or external (false). Value is ignored if no NLB is created. | bool |
false |
no |
service_subnets | The subnets in which the Unity Accelerator service will be deployed. | list(string) |
n/a | yes |
tags | Tags to apply to resources. | map(any) |
{ |
no |
unity_accelerator_alb_access_logs_prefix | Log prefix for Unity Accelerator Application Load Balancer access logs. If null the project prefix and module name are used. | string |
null |
no |
unity_accelerator_dashboard_password_arn | ARN of the AWS Secrets Manager secret containing the Unity Accelerator web dashboard password. Password must be the only value and stored as text, not as key/value JSON. If not passed, one will be created randomly. | string |
null |
no |
unity_accelerator_dashboard_username_arn | ARN of the AWS Secrets Manager secret containing the Unity Accelerator web dashboard username. Username must be the only value and stored as text, not as key/value JSON. If not passed, one will be created and defaulted to 'uauser'. | string |
null |
no |
unity_accelerator_debug_mode | Enables debug output for the Unity Accelerator service. | string |
"false" |
no |
unity_accelerator_docker_image | Docker image to use for Unity Accelerator. | string |
"unitytechnologies/accelerator:latest" |
no |
unity_accelerator_lb_access_logs_bucket | ID of the S3 bucket for Unity Accelerator Application Load Balancer and Network Load Balancer access log storage. If access logging is enabled and this is null the module creates a bucket. | string |
null |
no |
unity_accelerator_log_stdout | When true, outputs logs to stdout only. When false, writes logs to the persist directory. | string |
"true" |
no |
unity_accelerator_nlb_access_logs_prefix | Log prefix for Unity Accelerator Network Load Balancer access logs. If null the project prefix and module name are used. | string |
null |
no |
vpc_id | The ID of the VPC in which the service will be deployed. | string |
n/a | yes |
Outputs¶
Name | Description |
---|---|
alb_dns_name | DNS endpoint of Application Load Balancer (ALB) |
alb_security_group_id | ID of the Application Load Balancer's (ALB) security group |
alb_zone_id | Zone ID for Application Load Balancer (ALB) |
nlb_dns_name | DNS endpoint of Network Load Balancer (NLB) |
nlb_zone_id | Zone ID for Network Load Balancer (NLB) |
unity_accelerator_dashboard_password_arn | AWS Secrets Manager secret's ARN containing the Unity Accelerator web dashboard's username. |
unity_accelerator_dashboard_username_arn | AWS Secrets Manager secret's ARN containing the Unity Accelerator web dashboard's password. |