main.tf 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. locals {
  2. environment = "windows"
  3. aws_region = "eu-west-1"
  4. }
  5. resource "random_id" "random" {
  6. byte_length = 20
  7. }
  8. module "runners" {
  9. source = "../../"
  10. aws_region = local.aws_region
  11. vpc_id = module.vpc.vpc_id
  12. subnet_ids = module.vpc.private_subnets
  13. prefix = local.environment
  14. github_app = {
  15. key_base64 = var.github_app_key_base64
  16. id = var.github_app_id
  17. webhook_secret = random_id.random.hex
  18. }
  19. # Grab the lambda packages from local directory. Must run /.ci/build.sh first
  20. webhook_lambda_zip = "../../lambda_output/webhook.zip"
  21. runner_binaries_syncer_lambda_zip = "../../lambda_output/runner-binaries-syncer.zip"
  22. runners_lambda_zip = "../../lambda_output/runners.zip"
  23. enable_organization_runners = false
  24. # no need to add extra windows tag here as it is automatically added by GitHub
  25. runner_extra_labels = "default,example"
  26. # Set the OS to Windows
  27. runner_os = "windows"
  28. # we need to give the runner time to start because this is windows.
  29. runner_boot_time_in_minutes = 20
  30. # enable access to the runners via SSM
  31. enable_ssm_on_runners = true
  32. instance_types = ["m5.large", "c5.large"]
  33. # override delay of events in seconds for testing
  34. delay_webhook_event = 5
  35. # override scaling down for testing
  36. scale_down_schedule_expression = "cron(* * * * ? *)"
  37. }