Skip to content

Commit 88040ea

Browse files
committed
Run pre-commit hooks.
1 parent 139cb9c commit 88040ea

File tree

8 files changed

+113
-172
lines changed

8 files changed

+113
-172
lines changed

README.md

Lines changed: 32 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -242,57 +242,46 @@ When configuring `runners`
242242
- _ami_filter_ - set to `["amzn2-ami-hvm-2*-arm64-gp2"]`, defaults to `["amzn2-ami-hvm-2.*-x86_64-ebs"]`
243243

244244
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
245-
## Requirements
246-
247-
No requirements.
248-
249-
## Providers
250-
251-
| Name | Version |
252-
|------|---------|
253-
| aws | n/a |
254-
| random | n/a |
255-
256245
## Inputs
257246

258247
| Name | Description | Type | Default | Required |
259-
|------|-------------|------|---------|:--------:|
260-
| aws\_region | AWS region. | `string` | n/a | yes |
261-
| enable\_organization\_runners | n/a | `bool` | n/a | yes |
262-
| encrypt\_secrets | Encrypt secret variables for lambda's such as secrets and private keys. | `bool` | `true` | no |
263-
| environment | A name that identifies the environment, used as prefix and for tagging. | `string` | n/a | yes |
264-
| github\_app | GitHub app parameters, see your github app. Ensure the key is base64 encoded. | <pre>object({<br> key_base64 = string<br> id = string<br> client_id = string<br> client_secret = string<br> webhook_secret = string<br> })</pre> | n/a | yes |
265-
| instance\_profile\_path | The path that will be added to the instance\_profile, if not set the environment name will be used. | `string` | `null` | no |
266-
| instance\_type | Instance type for the action runner. | `string` | `"m5.large"` | no |
267-
| kms\_key\_id | Custom KMS key to encrypted lambda secrets, if not provided and `encrypt_secrets` = `true` a KMS key will be created by the module. Secrets will be encrypted with a context `Environment = var.environment`. | `string` | `null` | no |
268-
| manage\_kms\_key | Let the module manage the KMS key. | `bool` | `true` | no |
269-
| minimum\_running\_time\_in\_minutes | The time an ec2 action runner should be running at minimum before terminated if non busy. | `number` | `5` | no |
270-
| role\_path | The path that will be added to role path for created roles, if not set the environment name will be used. | `string` | `null` | no |
271-
| role\_permissions\_boundary | Permissions boundary that will be added to the created roles. | `string` | `null` | no |
272-
| runner\_as\_root | Run the action runner under the root user. | `bool` | `false` | no |
273-
| runner\_binaries\_syncer\_lambda\_timeout | Time out of the binaries sync lambda in seconds. | `number` | `300` | no |
274-
| runner\_binaries\_syncer\_lambda\_zip | File location of the binaries sync lambda zip file. | `string` | `null` | no |
275-
| runner\_extra\_labels | Extra labels for the runners (GitHub). Separate each label by a comma | `string` | `""` | no |
276-
| runners\_lambda\_zip | File location of the lambda zip file for scaling runners. | `string` | `null` | no |
277-
| runners\_maximum\_count | The maximum number of runners that will be created. | `number` | `3` | no |
278-
| runners\_scale\_down\_lambda\_timeout | Time out for the scale up lambda in seconds. | `number` | `60` | no |
279-
| runners\_scale\_up\_lambda\_timeout | Time out for the scale down lambda in seconds. | `number` | `60` | no |
280-
| scale\_down\_schedule\_expression | Scheduler expression to check every x for scale down. | `string` | `"cron(*/5 * * * ? *)"` | no |
281-
| subnet\_ids | List of subnets in which the action runners will be launched, the subnets needs to be subnets in the `vpc_id`. | `list(string)` | n/a | yes |
282-
| tags | Map of tags that will be added to created resources. By default resources will be tagged with name and environment. | `map(string)` | `{}` | no |
283-
| userdata\_post\_install | Script to be ran after the GitHub Actions runner is installed on the EC2 instances | `string` | `""` | no |
284-
| userdata\_pre\_install | Script to be ran before the GitHub Actions runner is installed on the EC2 instances | `string` | `""` | no |
285-
| vpc\_id | The VPC for security groups of the action runners. | `string` | n/a | yes |
286-
| webhook\_lambda\_timeout | Time out of the webhook lambda in seconds. | `number` | `10` | no |
287-
| webhook\_lambda\_zip | File location of the webhook lambda zip file. | `string` | `null` | no |
248+
|------|-------------|:----:|:-----:|:-----:|
249+
| aws\_region | AWS region. | string | n/a | yes |
250+
| enable\_organization\_runners | | bool | n/a | yes |
251+
| encrypt\_secrets | Encrypt secret variables for lambda's such as secrets and private keys. | bool | `"true"` | no |
252+
| environment | A name that identifies the environment, used as prefix and for tagging. | string | n/a | yes |
253+
| github\_app | GitHub app parameters, see your github app. Ensure the key is base64 encoded. | object | n/a | yes |
254+
| instance\_profile\_path | The path that will be added to the instance\_profile, if not set the environment name will be used. | string | `"null"` | no |
255+
| instance\_type | Instance type for the action runner. | string | `"m5.large"` | no |
256+
| kms\_key\_id | Custom KMS key to encrypted lambda secrets, if not provided and `encrypt\_secrets` = `true` a KMS key will be created by the module. Secrets will be encrypted with a context `Environment = var.environment`. | string | `"null"` | no |
257+
| manage\_kms\_key | Let the module manage the KMS key. | bool | `"true"` | no |
258+
| minimum\_running\_time\_in\_minutes | The time an ec2 action runner should be running at minimum before terminated if non busy. | number | `"5"` | no |
259+
| role\_path | The path that will be added to role path for created roles, if not set the environment name will be used. | string | `"null"` | no |
260+
| role\_permissions\_boundary | Permissions boundary that will be added to the created roles. | string | `"null"` | no |
261+
| runner\_as\_root | Run the action runner under the root user. | bool | `"false"` | no |
262+
| runner\_binaries\_syncer\_lambda\_timeout | Time out of the binaries sync lambda in seconds. | number | `"300"` | no |
263+
| runner\_binaries\_syncer\_lambda\_zip | File location of the binaries sync lambda zip file. | string | `"null"` | no |
264+
| runner\_extra\_labels | Extra labels for the runners \(GitHub\). Separate each label by a comma | string | `""` | no |
265+
| runners\_lambda\_zip | File location of the lambda zip file for scaling runners. | string | `"null"` | no |
266+
| runners\_maximum\_count | The maximum number of runners that will be created. | number | `"3"` | no |
267+
| runners\_scale\_down\_lambda\_timeout | Time out for the scale up lambda in seconds. | number | `"60"` | no |
268+
| runners\_scale\_up\_lambda\_timeout | Time out for the scale down lambda in seconds. | number | `"60"` | no |
269+
| scale\_down\_schedule\_expression | Scheduler expression to check every x for scale down. | string | `"cron(*/5 * * * ? *)"` | no |
270+
| subnet\_ids | List of subnets in which the action runners will be launched, the subnets needs to be subnets in the `vpc\_id`. | list(string) | n/a | yes |
271+
| tags | Map of tags that will be added to created resources. By default resources will be tagged with name and environment. | map(string) | `{}` | no |
272+
| userdata\_post\_install | Script to be ran after the GitHub Actions runner is installed on the EC2 instances | string | `""` | no |
273+
| userdata\_pre\_install | Script to be ran before the GitHub Actions runner is installed on the EC2 instances | string | `""` | no |
274+
| vpc\_id | The VPC for security groups of the action runners. | string | n/a | yes |
275+
| webhook\_lambda\_timeout | Time out of the webhook lambda in seconds. | number | `"10"` | no |
276+
| webhook\_lambda\_zip | File location of the webhook lambda zip file. | string | `"null"` | no |
288277

289278
## Outputs
290279

291280
| Name | Description |
292281
|------|-------------|
293-
| binaries\_syncer | n/a |
294-
| runners | n/a |
295-
| webhook | n/a |
282+
| binaries\_syncer | |
283+
| runners | |
284+
| webhook | |
296285

297286
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
298287

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ locals {
44
})
55

66
s3_action_runner_url = "s3://${module.runner_binaries.bucket.id}/${module.runner_binaries.runner_distribution_object_key}"
7-
runner_architecture = substr(var.instance_type, 0, 2) == "a1" || substr(var.instance_type, 1, 2) == "6g" ? "arm64" : "x64"
7+
runner_architecture = substr(var.instance_type, 0, 2) == "a1" || substr(var.instance_type, 1, 2) == "6g" ? "arm64" : "x64"
88
}
99

1010
resource "random_string" "random" {
@@ -64,7 +64,7 @@ module "runners" {
6464
instance_type = var.instance_type
6565

6666
runner_architecture = local.runner_architecture
67-
ami_filter = local.runner_architecture == "arm64" ? { name = ["amzn2-ami-hvm-2*-arm64-gp2"] } : { name = ["amzn2-ami-hvm-2.*-x86_64-ebs"] }
67+
ami_filter = local.runner_architecture == "arm64" ? { name = ["amzn2-ami-hvm-2*-arm64-gp2"] } : { name = ["amzn2-ami-hvm-2.*-x86_64-ebs"] }
6868

6969
sqs_build_queue = aws_sqs_queue.queued_builds
7070
github_app = var.github_app

modules/download-lambda/README.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,17 @@ module "lambdas" {
2525
```
2626

2727
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
28-
## Requirements
29-
30-
No requirements.
31-
32-
## Providers
33-
34-
| Name | Version |
35-
|------|---------|
36-
| null | n/a |
37-
3828
## Inputs
3929

4030
| Name | Description | Type | Default | Required |
41-
|------|-------------|------|---------|:--------:|
42-
| lambdas | Name and tag for lambdas to download. | <pre>list(object({<br> name = string<br> tag = string<br> }))</pre> | n/a | yes |
31+
|------|-------------|:----:|:-----:|:-----:|
32+
| lambdas | Name and tag for lambdas to download. | object | n/a | yes |
4333

4434
## Outputs
4535

4636
| Name | Description |
4737
|------|-------------|
48-
| files | n/a |
38+
| files | |
4939

5040
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
5141

modules/runner-binaries-syncer/README.md

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,38 +34,29 @@ yarn run dist
3434
```
3535

3636
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
37-
## Requirements
38-
39-
No requirements.
40-
41-
## Providers
42-
43-
| Name | Version |
44-
|------|---------|
45-
| aws | n/a |
46-
4737
## Inputs
4838

4939
| Name | Description | Type | Default | Required |
50-
|------|-------------|------|---------|:--------:|
51-
| aws\_region | AWS region. | `string` | n/a | yes |
52-
| distribution\_bucket\_name | Bucket for storing the action runner distribution. | `string` | n/a | yes |
53-
| environment | A name that identifies the environment, used as prefix and for tagging. | `string` | n/a | yes |
54-
| lambda\_schedule\_expression | Scheduler expression for action runner binary syncer. | `string` | `"cron(27 * * * ? *)"` | no |
55-
| lambda\_timeout | Time out of the lambda in seconds. | `number` | `300` | no |
56-
| lambda\_zip | File location of the lambda zip file. | `string` | `null` | no |
57-
| role\_path | The path that will be added to the role, if not set the environment name will be used. | `string` | `null` | no |
58-
| role\_permissions\_boundary | Permissions boundary that will be added to the created role for the lambda. | `string` | `null` | no |
59-
| tags | Map of tags that will be added to created resources. By default resources will be tagged with name and environment. | `map(string)` | `{}` | no |
40+
|------|-------------|:----:|:-----:|:-----:|
41+
| aws\_region | AWS region. | string | n/a | yes |
42+
| distribution\_bucket\_name | Bucket for storing the action runner distribution. | string | n/a | yes |
43+
| environment | A name that identifies the environment, used as prefix and for tagging. | string | n/a | yes |
44+
| lambda\_schedule\_expression | Scheduler expression for action runner binary syncer. | string | `"cron(27 * * * ? *)"` | no |
45+
| lambda\_timeout | Time out of the lambda in seconds. | number | `"300"` | no |
46+
| lambda\_zip | File location of the lambda zip file. | string | `"null"` | no |
47+
| role\_path | The path that will be added to the role, if not set the environment name will be used. | string | `"null"` | no |
48+
| role\_permissions\_boundary | Permissions boundary that will be added to the created role for the lambda. | string | `"null"` | no |
49+
| runner\_architecture | The platform architecture for the runner instance \(x64, arm64\), defaults to 'x64' | string | `"x64"` | no |
50+
| tags | Map of tags that will be added to created resources. By default resources will be tagged with name and environment. | map(string) | `{}` | no |
6051

6152
## Outputs
6253

6354
| Name | Description |
6455
|------|-------------|
65-
| bucket | n/a |
66-
| lambda | n/a |
67-
| lambda\_role | n/a |
68-
| runner\_distribution\_object\_key | n/a |
56+
| bucket | |
57+
| lambda | |
58+
| lambda\_role | |
59+
| runner\_distribution\_object\_key | |
6960

7061
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
7162

0 commit comments

Comments
 (0)