You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(runners): add option to prefix registered runners in GitHub (#3043)
* feat: add support to prefix the runner
update start scripts
fix scripts
refactor names and manage fixed tags via terraform
* sync with main, and clenup
* update docs
* Only tag ec2
* set default prefix to empty string in case of an error
* Add separator in example for prefix
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -524,6 +524,7 @@ We welcome any improvement to the standard module to make the default as secure
524
524
| <aname="input_runner_iam_role_managed_policy_arns"></a> [runner\_iam\_role\_managed\_policy\_arns](#input\_runner\_iam\_role\_managed\_policy\_arns)| Attach AWS or customer-managed IAM policies (by ARN) to the runner IAM role |`list(string)`|`[]`| no |
525
525
| <aname="input_runner_log_files"></a> [runner\_log\_files](#input\_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> |`null`| no |
526
526
| <aname="input_runner_metadata_options"></a> [runner\_metadata\_options](#input\_runner\_metadata\_options)| Metadata 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": "optional",<br> "instance_metadata_tags": "enabled"<br>}</pre> | no |
527
+
| <aname="input_runner_name_prefix"></a> [runner\_name\_prefix](#input\_runner\_name\_prefix)| The 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 |
527
528
| <aname="input_runner_os"></a> [runner\_os](#input\_runner\_os)| The EC2 Operating System type to use for action runner instances (linux,windows). |`string`|`"linux"`| no |
528
529
| <aname="input_runner_run_as"></a> [runner\_run\_as](#input\_runner\_run\_as)| Run the GitHub actions agent as user. |`string`|`"ec2-user"`| no |
529
530
| <aname="input_runners_lambda_s3_key"></a> [runners\_lambda\_s3\_key](#input\_runners\_lambda\_s3\_key)| S3 key for runners lambda function. Required if using S3 bucket to specify lambdas. |`string`|`null`| no |
runner_boot_time_in_minutes: "The minimum time for an EC2 runner to boot and register as a runner."
151
152
runner_extra_labels: "Extra (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."
152
153
runner_group_name: "Name of the runner group."
154
+
runner_name_prefix: "Prefix for the GitHub runner name."
153
155
runner_run_as: "Run the GitHub actions agent as user."
154
156
runners_maximum_count: "The maximum number of runners that will be created."
155
157
scale_down_schedule_expression: "Scheduler expression to check every x for scale down."
Copy file name to clipboardExpand all lines: modules/runners/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -185,6 +185,7 @@ yarn run dist
185
185
| <aname="input_runner_group_name"></a> [runner\_group\_name](#input\_runner\_group\_name)| Name of the runner group. |`string`|`"Default"`| no |
186
186
| <aname="input_runner_iam_role_managed_policy_arns"></a> [runner\_iam\_role\_managed\_policy\_arns](#input\_runner\_iam\_role\_managed\_policy\_arns)| Attach AWS or customer-managed IAM policies (by ARN) to the runner IAM role |`list(string)`|`[]`| no |
187
187
| <aname="input_runner_log_files"></a> [runner\_log\_files](#input\_runner\_log\_files)| (optional) List of logfiles to send to CloudWatch, will only be used if `enable_cloudwatch_agent` is set to true. Object description: `log_group_name`: Name of the log group, `prefix_log_group`: If true, the log group name will be prefixed with `/github-self-hosted-runners/<var.prefix>`, `file_path`: path to the log file, `log_stream_name`: name of the log stream. | <pre>list(object({<br> log_group_name = string<br> prefix_log_group = bool<br> file_path = string<br> log_stream_name = string<br> }))</pre> |`null`| no |
188
+
| <aname="input_runner_name_prefix"></a> [runner\_name\_prefix](#input\_runner\_name\_prefix)| The 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 |
188
189
| <aname="input_runner_os"></a> [runner\_os](#input\_runner\_os)| The EC2 Operating System type to use for action runner instances (linux,windows). |`string`|`"linux"`| no |
189
190
| <aname="input_runner_run_as"></a> [runner\_run\_as](#input\_runner\_run\_as)| Run the GitHub actions agent as user. |`string`|`"ec2-user"`| no |
190
191
| <aname="input_runners_lambda_s3_key"></a> [runners\_lambda\_s3\_key](#input\_runners\_lambda\_s3\_key)| S3 key for runners lambda function. Required if using S3 bucket to specify lambdas. |`string`|`null`| no |
| <aname="output_runners_log_groups"></a> [runners\_log\_groups](#output\_runners\_log\_groups)| List of log groups from different log files of runner machine. |
0 commit comments