Home

Awesome

Terraform module Self-Hosted Scalable GitHub Actions runners on AWS.

docs awesome-runners Terraform registry Terraform checks Lambdas

📢 We're moving terraform-aws-github-runner to a new organization https://github.com/github-aws-runners in January to foster growth and community ownership! 🎉 Join us on our new Discord server for discussions and updates. Please see #4298 for more details.

📄 Extensive documentation is available via our GitHub Pages Docs site.

📢 We maintain the project as a truly open-source project. We maintain the project on a best effort basis. We welcome contributions from the community. Feel free to help us answering issues, reviewing PRs, or maintaining and improving the project.

This Terraform module creates the required infrastructure needed to host GitHub Actions self-hosted, auto-scaling runners on AWS spot instances. It provides the required logic to handle the life cycle for scaling up and down using a set of AWS Lambda functions. Runners are scaled down to zero to avoid costs when no workflows are active.

<picture> <source media="(prefers-color-scheme: dark)" srcset="docs/assets/runners.dark.png"> <source media="(prefers-color-scheme: light)" srcset="docs/assets/runners.light.png"> <img alt="Runners overview" src="docs/assets/runners.light.png"> </picture>

Features

Getting started

Check out the detailed instructions in the Getting Started section of the docs. On a high level, the following steps are required to get started:

Check out the provided Terraform examples in the examples directory for different scenarios.

Configuration

Please check the configuration section of the docs for major configuration options. See the Terraform module documentation for all available options.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

We welcome contributions, please check out the contribution guide. Be aware we use pre commit hooks to update the docs.

Philips Forest

This module is part of the Philips Forest.

                                                     ___                   _
                                                    / __\__  _ __ ___  ___| |_
                                                   / _\/ _ \| '__/ _ \/ __| __|
                                                  / / | (_) | | |  __/\__ \ |_
                                                  \/   \___/|_|  \___||___/\__|

                                                                 Infrastructure

Talk to the forestkeepers in the runners-channel on Slack.

Slack

<details> <summary>Terraform root module documention</summary> <!-- --8<-- [start:mkdocsrunners] --> <!-- BEGIN_TF_DOCS -->

Requirements

NameVersion
<a name="requirement_terraform"></a> terraform>= 1.3.0
<a name="requirement_aws"></a> aws~> 5.77
<a name="requirement_random"></a> random~> 3.0

Providers

NameVersion
<a name="provider_aws"></a> aws~> 5.77
<a name="provider_random"></a> random~> 3.0

Modules

NameSourceVersion
<a name="module_ami_housekeeper"></a> ami_housekeeper./modules/ami-housekeepern/a
<a name="module_instance_termination_watcher"></a> instance_termination_watcher./modules/termination-watchern/a
<a name="module_runner_binaries"></a> runner_binaries./modules/runner-binaries-syncern/a
<a name="module_runners"></a> runners./modules/runnersn/a
<a name="module_ssm"></a> ssm./modules/ssmn/a
<a name="module_webhook"></a> webhook./modules/webhookn/a

Resources

NameType
aws_sqs_queue.queued_buildsresource
aws_sqs_queue.queued_builds_dlqresource
aws_sqs_queue_policy.build_queue_dlq_policyresource
aws_sqs_queue_policy.build_queue_policyresource
random_string.randomresource
aws_iam_policy_document.deny_unsecure_transportdata source

Inputs

NameDescriptionTypeDefaultRequired
<a name="input_ami_filter"></a> ami_filterMap of lists used to create the AMI filter for the action runner AMI.map(list(string))<pre>{<br/> "state": [<br/> "available"<br/> ]<br/>}</pre>no
<a name="input_ami_housekeeper_cleanup_config"></a> ami_housekeeper_cleanup_configConfiguration for AMI cleanup.<br/><br/> amiFilters - Filters to use when searching for AMIs to cleanup. Default filter for images owned by the account and that are available.<br/> dryRun - If true, no AMIs will be deregistered. Default false.<br/> launchTemplateNames - Launch template names to use when searching for AMIs to cleanup. Default no launch templates.<br/> maxItems - The maximum numer of AMI's tha will be queried for cleanup. Default no maximum.<br/> minimumDaysOld - Minimum number of days old an AMI must be to be considered for cleanup. Default 30.<br/> ssmParameterNames - SSM parameter names to use when searching for AMIs to cleanup. This parameter should be set when using SSM to configure the AMI to use. Default no SSM parameters.<pre>object({<br/> amiFilters = optional(list(object({<br/> Name = string<br/> Values = list(string)<br/> })),<br/> [{<br/> Name : "state",<br/> Values : ["available"],<br/> },<br/> {<br/> Name : "image-type",<br/> Values : ["machine"],<br/> }]<br/> )<br/> dryRun = optional(bool, false)<br/> launchTemplateNames = optional(list(string))<br/> maxItems = optional(number)<br/> minimumDaysOld = optional(number, 30)<br/> ssmParameterNames = optional(list(string))<br/> })</pre>{}no
<a name="input_ami_housekeeper_lambda_s3_key"></a> ami_housekeeper_lambda_s3_keyS3 key for syncer lambda function. Required if using S3 bucket to specify lambdas.stringnullno
<a name="input_ami_housekeeper_lambda_s3_object_version"></a> ami_housekeeper_lambda_s3_object_versionS3 object version for syncer lambda function. Useful if S3 versioning is enabled on source bucket.stringnullno
<a name="input_ami_housekeeper_lambda_schedule_expression"></a> ami_housekeeper_lambda_schedule_expressionScheduler expression for action runner binary syncer.string"rate(1 day)"no
<a name="input_ami_housekeeper_lambda_timeout"></a> ami_housekeeper_lambda_timeoutTime out of the lambda in seconds.number300no
<a name="input_ami_housekeeper_lambda_zip"></a> ami_housekeeper_lambda_zipFile location of the lambda zip file.stringnullno
<a name="input_ami_id_ssm_parameter_name"></a> ami_id_ssm_parameter_nameExternally managed SSM parameter (of data type aws:ec2:image) that contains the AMI ID to launch runner instances from. Overrides ami_filterstringnullno
<a name="input_ami_kms_key_arn"></a> ami_kms_key_arnOptional CMK Key ARN to be used to launch an instance from a shared encrypted AMIstringnullno
<a name="input_ami_owners"></a> ami_ownersThe list of owners used to select the AMI of action runner instances.list(string)<pre>[<br/> "amazon"<br/>]</pre>no
<a name="input_associate_public_ipv4_address"></a> associate_public_ipv4_addressAssociate public IPv4 with the runner. Only tested with IPv4boolfalseno
<a name="input_aws_partition"></a> aws_partition(optiona) partition in the arn namespace to use if not 'aws'string"aws"no
<a name="input_aws_region"></a> aws_regionAWS region.stringn/ayes
<a name="input_block_device_mappings"></a> block_device_mappingsThe EC2 instance block device configuration. Takes the following keys: device_name, delete_on_termination, volume_type, volume_size, encrypted, iops, throughput, kms_key_id, snapshot_id.<pre>list(object({<br/> delete_on_termination = optional(bool, true)<br/> device_name = optional(string, "/dev/xvda")<br/> encrypted = optional(bool, true)<br/> iops = optional(number)<br/> kms_key_id = optional(string)<br/> snapshot_id = optional(string)<br/> throughput = optional(number)<br/> volume_size = number<br/> volume_type = optional(string, "gp3")<br/> }))</pre><pre>[<br/> {<br/> "volume_size": 30<br/> }<br/>]</pre>no
<a name="input_cloudwatch_config"></a> cloudwatch_config(optional) Replaces the module's default cloudwatch log config. See https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-Configuration-File-Details.html for details.stringnullno
<a name="input_create_service_linked_role_spot"></a> create_service_linked_role_spot(optional) create the service linked role for spot instances that is required by the scale-up lambda.boolfalseno
<a name="input_delay_webhook_event"></a> delay_webhook_eventThe number of seconds the event accepted by the webhook is invisible on the queue before the scale up lambda will receive the event.number30no
<a name="input_disable_runner_autoupdate"></a> disable_runner_autoupdateDisable the auto update of the github runner agent. Be aware there is a grace period of 30 days, see also the GitHub articleboolfalseno
<a name="input_enable_ami_housekeeper"></a> enable_ami_housekeeperOption to disable the lambda to clean up old AMIs.boolfalseno
<a name="input_enable_cloudwatch_agent"></a> enable_cloudwatch_agentEnables the cloudwatch agent on the ec2 runner instances. The runner uses a default config that can be overridden via cloudwatch_config.booltrueno
<a name="input_enable_ephemeral_runners"></a> enable_ephemeral_runnersEnable ephemeral runners, runners will only be used once.boolfalseno
<a name="input_enable_jit_config"></a> enable_jit_configOverwrite the default behavior for JIT configuration. By default JIT configuration is enabled for ephemeral runners and disabled for non-ephemeral runners. In case of GHES check first if the JIT config API is avaialbe. In case you upgradeing from 3.x to 4.x you can set enable_jit_config to false to avoid a breaking change when having your own AMI.boolnullno
<a name="input_enable_job_queued_check"></a> enable_job_queued_checkOnly scale if the job event received by the scale up lambda is in the queued state. By default enabled for non ephemeral runners and disabled for ephemeral. Set this variable to overwrite the default behavior.boolnullno
<a name="input_enable_managed_runner_security_group"></a> enable_managed_runner_security_groupEnables creation of the default managed security group. Unmanaged security groups can be specified via runner_additional_security_group_ids.booltrueno
<a name="input_enable_organization_runners"></a> enable_organization_runnersRegister runners to organization, instead of repo levelboolfalseno
<a name="input_enable_runner_binaries_syncer"></a> enable_runner_binaries_syncerOption to disable the lambda to sync GitHub runner distribution, useful when using a pre-build AMI.booltrueno
<a name="input_enable_runner_detailed_monitoring"></a> enable_runner_detailed_monitoringShould detailed monitoring be enabled for the runner. Set this to true if you want to use detailed monitoring. See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch-new.html for details.boolfalseno
<a name="input_enable_runner_on_demand_failover_for_errors"></a> enable_runner_on_demand_failover_for_errorsEnable on-demand failover. For example to fall back to on demand when no spot capacity is available the variable can be set to InsufficientInstanceCapacity. When not defined the default behavior is to retry later.list(string)[]no
<a name="input_enable_runner_workflow_job_labels_check_all"></a> enable_runner_workflow_job_labels_check_allIf set to true all labels in the workflow job must match the GitHub labels (os, architecture and self-hosted). When false if any label matches it will trigger the webhook.booltrueno
<a name="input_enable_ssm_on_runners"></a> enable_ssm_on_runnersEnable to allow access to the runner instances for debugging purposes via SSM. Note that this adds additional permissions to the runner instances.boolfalseno
<a name="input_enable_user_data_debug_logging_runner"></a> enable_user_data_debug_logging_runnerOption to enable debug logging for user-data, this logs all secrets as well.boolfalseno
<a name="input_enable_userdata"></a> enable_userdataShould the userdata script be enabled for the runner. Set this to false if you are using your own prebuilt AMI.booltrueno
<a name="input_eventbridge"></a> eventbridgeEnable the use of EventBridge by the module. By enabling this feature events will be put on the EventBridge by the webhook instead of directly dispatching to queues for scaling.<br/><br/> enable: Enable the EventBridge feature.<br/> accept_events: List can be used to only allow specific events to be putted on the EventBridge. By default all events, empty list will be be interpreted as all events.<pre>object({<br/> enable = optional(bool, true)<br/> accept_events = optional(list(string), null)<br/> })</pre>{}no
<a name="input_ghes_ssl_verify"></a> ghes_ssl_verifyGitHub Enterprise SSL verification. Set to 'false' when custom certificate (chains) is used for GitHub Enterprise Server (insecure).booltrueno
<a name="input_ghes_url"></a> ghes_urlGitHub Enterprise Server URL. Example: https://github.internal.co - DO NOT SET IF USING PUBLIC GITHUBstringnullno
<a name="input_github_app"></a> github_appGitHub app parameters, see your github app. Ensure the key is the base64-encoded .pem file (the output of base64 app.private-key.pem, not the content of private-key.pem).<pre>object({<br/> key_base64 = string<br/> id = string<br/> webhook_secret = string<br/> })</pre>n/ayes
<a name="input_idle_config"></a> idle_configList of time periods, defined as a cron expression, to keep a minimum amount of runners active instead of scaling down to 0. By defining this list you can ensure that in time periods that match the cron expression within 5 seconds a runner is kept idle.<pre>list(object({<br/> cron = string<br/> timeZone = string<br/> idleCount = number<br/> evictionStrategy = optional(string, "oldest_first")<br/> }))</pre>[]no
<a name="input_instance_allocation_strategy"></a> instance_allocation_strategyThe allocation strategy for spot instances. AWS recommends using price-capacity-optimized however the AWS default is lowest-price.string"lowest-price"no
<a name="input_instance_max_spot_price"></a> instance_max_spot_priceMax price price for spot instances per hour. This variable will be passed to the create fleet as max spot price for the fleet.stringnullno
<a name="input_instance_profile_path"></a> instance_profile_pathThe path that will be added to the instance_profile, if not set the environment name will be used.stringnullno
<a name="input_instance_target_capacity_type"></a> instance_target_capacity_typeDefault lifecycle used for runner instances, can be either spot or on-demand.string"spot"no
<a name="input_instance_termination_watcher"></a> instance_termination_watcherConfiguration for the instance termination watcher. This feature is Beta, changes will not trigger a major release as long in beta.<br/><br/>enable: Enable or disable the spot termination watcher.<br/>'features': Enable or disable features of the termination watcher.<br/>memory_size: Memory size linit in MB of the lambda.<br/>s3_key: S3 key for syncer lambda function. Required if using S3 bucket to specify lambdas.<br/>s3_object_version: S3 object version for syncer lambda function. Useful if S3 versioning is enabled on source bucket.<br/>timeout: Time out of the lambda in seconds.<br/>zip: File location of the lambda zip file.<pre>object({<br/> enable = optional(bool, false)<br/> features = optional(object({<br/> enable_spot_termination_handler = optional(bool, true)<br/> enable_spot_termination_notification_watcher = optional(bool, true)<br/> }), {})<br/> memory_size = optional(number, null)<br/> s3_key = optional(string, null)<br/> s3_object_version = optional(string, null)<br/> timeout = optional(number, null)<br/> zip = optional(string, null)<br/> })</pre>{}no
<a name="input_instance_types"></a> instance_typesList of instance types for the action runner. Defaults are based on runner_os (al2023 for linux and Windows Server Core for win).list(string)<pre>[<br/> "m5.large",<br/> "c5.large"<br/>]</pre>no
<a name="input_job_queue_retention_in_seconds"></a> job_queue_retention_in_secondsThe number of seconds the job is held in the queue before it is purged.number86400no
<a name="input_job_retry"></a> job_retryExperimental! Can be removed / changed without trigger a major release.Configure job retries. The configuration enables job retries (for ephemeral runners). After creating the insances a message will be published to a job retry queue. The job retry check lambda is checking after a delay if the job is queued. If not the message will be published again on the scale-up (build queue). Using this feature can impact the reate limit of the GitHub app.<br/><br/>enable: Enable or disable the job retry feature.<br/>delay_in_seconds: The delay in seconds before the job retry check lambda will check the job status.<br/>delay_backoff: The backoff factor for the delay.<br/>lambda_memory_size: Memory size limit in MB for the job retry check lambda.<br/>lambda_timeout: Time out of the job retry check lambda in seconds.<br/>max_attempts: The maximum number of attempts to retry the job.<pre>object({<br/> enable = optional(bool, false)<br/> delay_in_seconds = optional(number, 300)<br/> delay_backoff = optional(number, 2)<br/> lambda_memory_size = optional(number, 256)<br/> lambda_timeout = optional(number, 30)<br/> max_attempts = optional(number, 1)<br/> })</pre>{}no
<a name="input_key_name"></a> key_nameKey pair namestringnullno
<a name="input_kms_key_arn"></a> kms_key_arnOptional CMK Key ARN to be used for Parameter Store. This key must be in the current account.stringnullno
<a name="input_lambda_architecture"></a> lambda_architectureAWS Lambda architecture. Lambda functions using Graviton processors ('arm64') tend to have better price/performance than 'x86_64' functions.string"arm64"no
<a name="input_lambda_principals"></a> lambda_principals(Optional) add extra principals to the role created for execution of the lambda, e.g. for local testing.<pre>list(object({<br/> type = string<br/> identifiers = list(string)<br/> }))</pre>[]no
<a name="input_lambda_runtime"></a> lambda_runtimeAWS Lambda runtime.string"nodejs22.x"no
<a name="input_lambda_s3_bucket"></a> lambda_s3_bucketS3 bucket from which to specify lambda functions. This is an alternative to providing local files directly.stringnullno
<a name="input_lambda_security_group_ids"></a> lambda_security_group_idsList of security group IDs associated with the Lambda function.list(string)[]no
<a name="input_lambda_subnet_ids"></a> lambda_subnet_idsList of subnets in which the action runners will be launched, the subnets needs to be subnets in the vpc_id.list(string)[]no
<a name="input_lambda_tags"></a> lambda_tagsMap of tags that will be added to all the lambda function resources. Note these are additional tags to the default tags.map(string){}no
<a name="input_log_level"></a> log_levelLogging level for lambda logging. Valid values are 'silly', 'trace', 'debug', 'info', 'warn', 'error', 'fatal'.string"info"no
<a name="input_logging_kms_key_id"></a> logging_kms_key_idSpecifies the kms key id to encrypt the logs with.stringnullno
<a name="input_logging_retention_in_days"></a> logging_retention_in_daysSpecifies the number of days you want to retain log events for the lambda log group. Possible values are: 0, 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653.number180no
<a name="input_matcher_config_parameter_store_tier"></a> matcher_config_parameter_store_tierThe tier of the parameter store for the matcher configuration. Valid values are Standard, and Advanced.string"Standard"no
<a name="input_metrics"></a> metricsConfiguration for metrics created by the module, by default disabled to avoid additional costs. When metrics are enable all metrics are created unless explicit configured otherwise.<pre>object({<br/> enable = optional(bool, false)<br/> namespace = optional(string, "GitHub Runners")<br/> metric = optional(object({<br/> enable_github_app_rate_limit = optional(bool, true)<br/> enable_job_retry = optional(bool, true)<br/> enable_spot_termination_warning = optional(bool, true)<br/> }), {})<br/> })</pre>{}no
<a name="input_minimum_running_time_in_minutes"></a> minimum_running_time_in_minutesThe time an ec2 action runner should be running at minimum before terminated, if not busy.numbernullno
<a name="input_pool_config"></a> pool_configThe configuration for updating the pool. The pool_size to adjust to by the events triggered by the schedule_expression. For example you can configure a cron expression for weekdays to adjust the pool to 10 and another expression for the weekend to adjust the pool to 1. Use schedule_expression_timezone to override the schedule time zone (defaults to UTC).<pre>list(object({<br/> schedule_expression = string<br/> schedule_expression_timezone = optional(string)<br/> size = number<br/> }))</pre>[]no
<a name="input_pool_lambda_memory_size"></a> pool_lambda_memory_sizeMemory size limit for scale-up lambda.number512no
<a name="input_pool_lambda_reserved_concurrent_executions"></a> pool_lambda_reserved_concurrent_executionsAmount of reserved concurrent executions for the scale-up lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations.number1no
<a name="input_pool_lambda_timeout"></a> pool_lambda_timeoutTime out for the pool lambda in seconds.number60no
<a name="input_pool_runner_owner"></a> pool_runner_ownerThe pool will deploy runners to the GitHub org ID, set this value to the org to which you want the runners deployed. Repo level is not supported.stringnullno
<a name="input_prefix"></a> prefixThe prefix used for naming resourcesstring"github-actions"no
<a name="input_queue_encryption"></a> queue_encryptionConfigure how data on queues managed by the modules in ecrypted at REST. Options are encryped via SSE, non encrypted and via KMSS. By default encryptes via SSE is enabled. See for more details the Terraform aws_sqs_queue resource https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue.<pre>object({<br/> kms_data_key_reuse_period_seconds = number<br/> kms_master_key_id = string<br/> sqs_managed_sse_enabled = bool<br/> })</pre><pre>{<br/> "kms_data_key_reuse_period_seconds": null,<br/> "kms_master_key_id": null,<br/> "sqs_managed_sse_enabled": true<br/>}</pre>no
<a name="input_redrive_build_queue"></a> redrive_build_queueSet options to attach (optional) a dead letter queue to the build queue, the queue between the webhook and the scale up lambda. You have the following options. 1. Disable by setting enabled to false. 2. Enable by setting enabled to true, maxReceiveCount to a number of max retries.<pre>object({<br/> enabled = bool<br/> maxReceiveCount = number<br/> })</pre><pre>{<br/> "enabled": false,<br/> "maxReceiveCount": null<br/>}</pre>no
<a name="input_repository_white_list"></a> repository_white_listList of github repository full names (owner/repo_name) that will be allowed to use the github app. Leave empty for no filtering.list(string)[]no
<a name="input_role_path"></a> role_pathThe path that will be added to role path for created roles, if not set the environment name will be used.stringnullno
<a name="input_role_permissions_boundary"></a> role_permissions_boundaryPermissions boundary that will be added to the created roles.stringnullno
<a name="input_runner_additional_security_group_ids"></a> runner_additional_security_group_ids(optional) List of additional security groups IDs to apply to the runner.list(string)[]no
<a name="input_runner_architecture"></a> runner_architectureThe platform architecture of the runner instance_type.string"x64"no
<a name="input_runner_as_root"></a> runner_as_rootRun the action runner under the root user. Variable runner_run_as will be ignored.boolfalseno
<a name="input_runner_binaries_s3_logging_bucket"></a> runner_binaries_s3_logging_bucketBucket for action runner distribution bucket access logging.stringnullno
<a name="input_runner_binaries_s3_logging_bucket_prefix"></a> runner_binaries_s3_logging_bucket_prefixBucket prefix for action runner distribution bucket access logging.stringnullno
<a name="input_runner_binaries_s3_sse_configuration"></a> runner_binaries_s3_sse_configurationMap containing server-side encryption configuration for runner-binaries S3 bucket.any<pre>{<br/> "rule": {<br/> "apply_server_side_encryption_by_default": {<br/> "sse_algorithm": "AES256"<br/> }<br/> }<br/>}</pre>no
<a name="input_runner_binaries_s3_versioning"></a> runner_binaries_s3_versioningStatus of S3 versioning for runner-binaries S3 bucket. Once set to Enabled the change cannot be reverted via Terraform!string"Disabled"no
<a name="input_runner_binaries_syncer_lambda_memory_size"></a> runner_binaries_syncer_lambda_memory_sizeMemory size limit in MB for binary syncer lambda.number256no
<a name="input_runner_binaries_syncer_lambda_timeout"></a> runner_binaries_syncer_lambda_timeoutTime out of the binaries sync lambda in seconds.number300no
<a name="input_runner_binaries_syncer_lambda_zip"></a> runner_binaries_syncer_lambda_zipFile location of the binaries sync lambda zip file.stringnullno
<a name="input_runner_boot_time_in_minutes"></a> runner_boot_time_in_minutesThe minimum time for an EC2 runner to boot and register as a runner.number5no
<a name="input_runner_credit_specification"></a> runner_credit_specificationThe credit option for CPU usage of a T instance. Can be unset, "standard" or "unlimited".stringnullno
<a name="input_runner_disable_default_labels"></a> runner_disable_default_labelsDisable default labels for the runners (os, architecture and self-hosted). If enabled, the runner will only have the extra labels provided in runner_extra_labels. In case you on own start script is used, this configuration parameter needs to be parsed via SSM.boolfalseno
<a name="input_runner_ec2_tags"></a> runner_ec2_tagsMap of tags that will be added to the launch template instance tag specifications.map(string){}no
<a name="input_runner_egress_rules"></a> runner_egress_rulesList of egress rules for the GitHub runner instances.<pre>list(object({<br/> cidr_blocks = list(string)<br/> ipv6_cidr_blocks = list(string)<br/> prefix_list_ids = list(string)<br/> from_port = number<br/> protocol = string<br/> security_groups = list(string)<br/> self = bool<br/> to_port = number<br/> description = string<br/> }))</pre><pre>[<br/> {<br/> "cidr_blocks": [<br/> "0.0.0.0/0"<br/> ],<br/> "description": null,<br/> "from_port": 0,<br/> "ipv6_cidr_blocks": [<br/> "::/0"<br/> ],<br/> "prefix_list_ids": null,<br/> "protocol": "-1",<br/> "security_groups": null,<br/> "self": null,<br/> "to_port": 0<br/> }<br/>]</pre>no
<a name="input_runner_extra_labels"></a> runner_extra_labelsExtra (custom) labels for the runners (GitHub). Separate each label by a comma. Labels checks on the webhook can be enforced by setting enable_workflow_job_labels_check. GitHub read-only labels should not be provided.list(string)[]no
<a name="input_runner_group_name"></a> runner_group_nameName of the runner group.string"Default"no
<a name="input_runner_hook_job_completed"></a> runner_hook_job_completedScript to be ran in the runner environment at the end of every jobstring""no
<a name="input_runner_hook_job_started"></a> runner_hook_job_startedScript to be ran in the runner environment at the beginning of every jobstring""no
<a name="input_runner_iam_role_managed_policy_arns"></a> runner_iam_role_managed_policy_arnsAttach AWS or customer-managed IAM policies (by ARN) to the runner IAM rolelist(string)[]no
<a name="input_runner_log_files"></a> runner_log_files(optional) Replaces the module default cloudwatch log config. See https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-Configuration-File-Details.html for details.<pre>list(object({<br/> log_group_name = string<br/> prefix_log_group = bool<br/> file_path = string<br/> log_stream_name = string<br/> }))</pre>nullno
<a name="input_runner_metadata_options"></a> runner_metadata_optionsMetadata options for the ec2 runner instances. By default, the module uses metadata tags for bootstrapping the runner, only disable instance_metadata_tags when using custom scripts for starting the runner.map(any)<pre>{<br/> "http_endpoint": "enabled",<br/> "http_put_response_hop_limit": 1,<br/> "http_tokens": "required",<br/> "instance_metadata_tags": "enabled"<br/>}</pre>no
<a name="input_runner_name_prefix"></a> runner_name_prefixThe prefix used for the GitHub runner name. The prefix will be used in the default start script to prefix the instance name when register the runner in GitHub. The value is availabe via an EC2 tag 'ghr:runner_name_prefix'.string""no
<a name="input_runner_os"></a> runner_osThe EC2 Operating System type to use for action runner instances (linux,windows).string"linux"no
<a name="input_runner_run_as"></a> runner_run_asRun the GitHub actions agent as user.string"ec2-user"no
<a name="input_runners_ebs_optimized"></a> runners_ebs_optimizedEnable EBS optimization for the runner instances.boolfalseno
<a name="input_runners_lambda_s3_key"></a> runners_lambda_s3_keyS3 key for runners lambda function. Required if using S3 bucket to specify lambdas.stringnullno
<a name="input_runners_lambda_s3_object_version"></a> runners_lambda_s3_object_versionS3 object version for runners lambda function. Useful if S3 versioning is enabled on source bucket.stringnullno
<a name="input_runners_lambda_zip"></a> runners_lambda_zipFile location of the lambda zip file for scaling runners.stringnullno
<a name="input_runners_maximum_count"></a> runners_maximum_countThe maximum number of runners that will be created.number3no
<a name="input_runners_scale_down_lambda_memory_size"></a> runners_scale_down_lambda_memory_sizeMemory size limit in MB for scale-down lambda.number512no
<a name="input_runners_scale_down_lambda_timeout"></a> runners_scale_down_lambda_timeoutTime out for the scale down lambda in seconds.number60no
<a name="input_runners_scale_up_lambda_memory_size"></a> runners_scale_up_lambda_memory_sizeMemory size limit in MB for scale-up lambda.number512no
<a name="input_runners_scale_up_lambda_timeout"></a> runners_scale_up_lambda_timeoutTime out for the scale up lambda in seconds.number30no
<a name="input_runners_ssm_housekeeper"></a> runners_ssm_housekeeperConfiguration for the SSM housekeeper lambda. This lambda deletes token / JIT config from SSM.<br/><br/> schedule_expression: is used to configure the schedule for the lambda.<br/> enabled: enable or disable the lambda trigger via the EventBridge.<br/> lambda_memory_size: lambda memery size limit.<br/> lambda_timeout: timeout for the lambda in seconds.<br/> config: configuration for the lambda function. Token path will be read by default from the module.<pre>object({<br/> schedule_expression = optional(string, "rate(1 day)")<br/> enabled = optional(bool, true)<br/> lambda_memory_size = optional(number, 512)<br/> lambda_timeout = optional(number, 60)<br/> config = object({<br/> tokenPath = optional(string)<br/> minimumDaysOld = optional(number, 1)<br/> dryRun = optional(bool, false)<br/> })<br/> })</pre><pre>{<br/> "config": {}<br/>}</pre>no
<a name="input_scale_down_schedule_expression"></a> scale_down_schedule_expressionScheduler expression to check every x for scale down.string"cron(*/5 * * * ? *)"no
<a name="input_scale_up_reserved_concurrent_executions"></a> scale_up_reserved_concurrent_executionsAmount of reserved concurrent executions for the scale-up lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations.number1no
<a name="input_ssm_paths"></a> ssm_pathsThe root path used in SSM to store configuration and secrets.<pre>object({<br/> root = optional(string, "github-action-runners")<br/> app = optional(string, "app")<br/> runners = optional(string, "runners")<br/> webhook = optional(string, "webhook")<br/> use_prefix = optional(bool, true)<br/> })</pre>{}no
<a name="input_state_event_rule_binaries_syncer"></a> state_event_rule_binaries_syncerOption to disable EventBridge Lambda trigger for the binary syncer, useful to stop automatic updates of binary distributionstring"ENABLED"no
<a name="input_subnet_ids"></a> subnet_idsList of subnets in which the action runner instances will be launched. The subnets need to exist in the configured VPC (vpc_id), and must reside in different availability zones (see https://github.com/philips-labs/terraform-aws-github-runner/issues/2904)list(string)n/ayes
<a name="input_syncer_lambda_s3_key"></a> syncer_lambda_s3_keyS3 key for syncer lambda function. Required if using an S3 bucket to specify lambdas.stringnullno
<a name="input_syncer_lambda_s3_object_version"></a> syncer_lambda_s3_object_versionS3 object version for syncer lambda function. Useful if S3 versioning is enabled on source bucket.stringnullno
<a name="input_tags"></a> tagsMap of tags that will be added to created resources. By default resources will be tagged with name and environment.map(string){}no
<a name="input_tracing_config"></a> tracing_configConfiguration for lambda tracing.<pre>object({<br/> mode = optional(string, null)<br/> capture_http_requests = optional(bool, false)<br/> capture_error = optional(bool, false)<br/> })</pre>{}no
<a name="input_userdata_content"></a> userdata_contentAlternative user-data content, replacing the templated one. By providing your own user_data you have to take care of installing all required software, including the action runner and registering the runner. Be-aware configuration paramaters in SSM as well as tags are treated as internals. Changes will not trigger a breaking release.stringnullno
<a name="input_userdata_post_install"></a> userdata_post_installScript to be ran after the GitHub Actions runner is installed on the EC2 instancesstring""no
<a name="input_userdata_pre_install"></a> userdata_pre_installScript to be ran before the GitHub Actions runner is installed on the EC2 instancesstring""no
<a name="input_userdata_template"></a> userdata_templateAlternative user-data template file path, replacing the default template. By providing your own user_data you have to take care of installing all required software, including the action runner. Variables userdata_pre/post_install are ignored.stringnullno
<a name="input_vpc_id"></a> vpc_idThe VPC for security groups of the action runners.stringn/ayes
<a name="input_webhook_lambda_apigateway_access_log_settings"></a> webhook_lambda_apigateway_access_log_settingsAccess log settings for webhook API gateway.<pre>object({<br/> destination_arn = string<br/> format = string<br/> })</pre>nullno
<a name="input_webhook_lambda_memory_size"></a> webhook_lambda_memory_sizeMemory size limit in MB for webhook lambda in.number256no
<a name="input_webhook_lambda_s3_key"></a> webhook_lambda_s3_keyS3 key for webhook lambda function. Required if using S3 bucket to specify lambdas.stringnullno
<a name="input_webhook_lambda_s3_object_version"></a> webhook_lambda_s3_object_versionS3 object version for webhook lambda function. Useful if S3 versioning is enabled on source bucket.stringnullno
<a name="input_webhook_lambda_timeout"></a> webhook_lambda_timeoutTime out of the webhook lambda in seconds.number10no
<a name="input_webhook_lambda_zip"></a> webhook_lambda_zipFile location of the webhook lambda zip file.stringnullno

Outputs

NameDescription
<a name="output_binaries_syncer"></a> binaries_syncern/a
<a name="output_instance_termination_handler"></a> instance_termination_handlern/a
<a name="output_instance_termination_watcher"></a> instance_termination_watchern/a
<a name="output_queues"></a> queuesSQS queues.
<a name="output_runners"></a> runnersn/a
<a name="output_ssm_parameters"></a> ssm_parametersn/a
<a name="output_webhook"></a> webhookn/a
<!-- END_TF_DOCS --> <!-- --8<-- [end:mkdocsrunners] --> </details>