This Terraform project creates an AWS EC2 Windows instance with GPU drivers and pre-installed software like OBS Studio, accessible via Amazon DCV.
- AWS Account with appropriate permissions
- Terraform Cloud workspace existing (
wyscout-magicbox-prod
) - Terraform CLI installed locally
- AWS CLI configured
Before execution, configure the following variables in the Terraform Cloud workspace wyscout-magicbox-prod
:
AWS_ACCESS_KEY_ID
- AWS credentials (if not using assume_role)AWS_SECRET_ACCESS_KEY
- AWS credentials (if not using assume_role)
region
- AWS region (default: eu-west-1)instance_type
- EC2 instance type (default: g4dn.xlarge)key_name
- AWS key pair name for DCV accessallowed_cidr_blocks
- CIDR blocks allowed for DCV (default: ["0.0.0.0/0"])aws_provider_role_arn_wyexternal
- IAM role ARN (default: arn:aws:iam::858373385149:role/TerraformRunner)environment
- Environment name (default: beta)
# 1. Project is already configured for "hudl" organization and "wyscout-magicbox-prod" workspace
# 2. Login to Terraform Cloud (only needed for local development)
terraform login
# 3. Initialize the project (only needed for local development)
terraform init
# 4. Validate the configuration
terraform validate
# 5. Plan the changes (optional - will also run automatically via Git)
terraform plan
# 6. For production deployment: Push to master branch
git push origin master
- Configure workspace
wyscout-magicbox-prod
in Terraform Cloud - Connect GitHub repository:
https://github.com/hudl/wy-obs-terraform
- Set trigger branch:
master
- Configure required variables (see Variables section above)
- Push to master → Automatic deployment
terraform init
terraform plan
terraform apply
- EC2 Windows Server 2022 with GPU support
- NVIDIA drivers pre-installed
- OBS Studio automatically installed
- Amazon DCV for secure remote access
- Security Group configured for DCV
- UserData script for automatic software installation
- EC2 Instance (Windows Server 2022)
- Security Group for DCV
- IAM Role and Instance Profile (if needed)
instance_id
- EC2 instance IDpublic_ip
- Instance public IPdcv_connection
- URL to connect via DCV
After deployment, access the instance via Amazon DCV:
Use the URL provided in the dcv_connection
output:
https://[PUBLIC_IP]:8443
- Open a web browser
- Navigate to the DCV URL
- Accept the SSL certificate warning (self-signed certificate)
- Username:
Administrator
- Password:
WyObs2025!
(configured automatically)
Once connected, you'll have access to:
- Windows desktop with GPU acceleration
- OBS Studio (desktop shortcut available)
- All installed streaming software
- DCV Native Client: Download from AWS for better performance
- AWS Console: Use EC2 Instance Connect for troubleshooting
The g4dn.xlarge instance has an approximate cost of €0.47/hour in eu-west-1.
- Uses Terraform Cloud organization hudl
- Configured for workspace wyscout-magicbox-prod
- Uses AWS provider version 4.34.0 for compatibility
- Supports assume_role for AWS authentication
- Includes default tags for Environment and Project
- Amazon DCV provides high-performance remote access for graphics applications