Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit c42a467

Browse files
npalmgusfune
andauthored
fix: Wrong block device mapping (#2019)
* fix: block name should default to `dev/xvda` * fix: Wrong default for block device mapping Co-authored-by: Gus Fune <[email protected]>
1 parent b733248 commit c42a467

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ In case the setup does not work as intended follow the trace of events:
402402
| <a name="input_ami_owners"></a> [ami\_owners](#input\_ami\_owners) | The list of owners used to select the AMI of action runner instances. | `list(string)` | <pre>[<br> "amazon"<br>]</pre> | no |
403403
| <a name="input_aws_partition"></a> [aws\_partition](#input\_aws\_partition) | (optiona) partition in the arn namespace to use if not 'aws' | `string` | `"aws"` | no |
404404
| <a name="input_aws_region"></a> [aws\_region](#input\_aws\_region) | AWS region. | `string` | n/a | yes |
405-
| <a name="input_block_device_mappings"></a> [block\_device\_mappings](#input\_block\_device\_mappings) | The EC2 instance block device configuration. Takes the following keys: `device_name`, `delete_on_termination`, `volume_type`, `volume_size`, `encrypted`, `iops` | <pre>list(object({<br> device_name = string<br> delete_on_termination = bool<br> volume_type = string<br> volume_size = number<br> encrypted = bool<br> iops = number<br> }))</pre> | <pre>[<br> {<br> "delete_on_termination": true,<br> "device_name": "/dev/xvd",<br> "encrypted": true,<br> "iops": null,<br> "volume_size": 30,<br> "volume_type": "gp3"<br> }<br>]</pre> | no |
405+
| <a name="input_block_device_mappings"></a> [block\_device\_mappings](#input\_block\_device\_mappings) | The EC2 instance block device configuration. Takes the following keys: `device_name`, `delete_on_termination`, `volume_type`, `volume_size`, `encrypted`, `iops` | <pre>list(object({<br> device_name = string<br> delete_on_termination = bool<br> volume_type = string<br> volume_size = number<br> encrypted = bool<br> iops = number<br> }))</pre> | <pre>[<br> {<br> "delete_on_termination": true,<br> "device_name": "/dev/xvda",<br> "encrypted": true,<br> "iops": null,<br> "volume_size": 30,<br> "volume_type": "gp3"<br> }<br>]</pre> | no |
406406
| <a name="input_cloudwatch_config"></a> [cloudwatch\_config](#input\_cloudwatch\_config) | (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. | `string` | `null` | no |
407407
| <a name="input_create_service_linked_role_spot"></a> [create\_service\_linked\_role\_spot](#input\_create\_service\_linked\_role\_spot) | (optional) create the serviced linked role for spot instances that is required by the scale-up lambda. | `bool` | `false` | no |
408408
| <a name="input_delay_webhook_event"></a> [delay\_webhook\_event](#input\_delay\_webhook\_event) | The number of seconds the event accepted by the webhook is invisible on the queue before the scale up lambda will receive the event. | `number` | `30` | no |

Diff for: examples/default/main.tf

+13-5
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,22 @@ module "runners" {
3030
webhook_secret = random_id.random.hex
3131
}
3232

33-
block_device_mappings = []
33+
# configure the block device mappings, default for Amazon Linux2
34+
# block_device_mappings = [{
35+
# device_name = "/dev/xvda"
36+
# delete_on_termination = true
37+
# volume_type = "gp3"
38+
# volume_size = 10
39+
# encrypted = true
40+
# iops = null
41+
# }]
3442

3543
# Grab zip files via lambda_download
36-
# webhook_lambda_zip = "lambdas-download/webhook.zip"
37-
# runner_binaries_syncer_lambda_zip = "lambdas-download/runner-binaries-syncer.zip"
38-
# runners_lambda_zip = "lambdas-download/runners.zip"
44+
webhook_lambda_zip = "lambdas-download/webhook.zip"
45+
runner_binaries_syncer_lambda_zip = "lambdas-download/runner-binaries-syncer.zip"
46+
runners_lambda_zip = "lambdas-download/runners.zip"
3947

40-
enable_organization_runners = true
48+
enable_organization_runners = false
4149
runner_extra_labels = "default,example"
4250

4351
# enable access to the runners via SSM

Diff for: modules/runners/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ yarn run dist
117117
| <a name="input_ami_owners"></a> [ami\_owners](#input\_ami\_owners) | The list of owners used to select the AMI of action runner instances. | `list(string)` | <pre>[<br> "amazon"<br>]</pre> | no |
118118
| <a name="input_aws_partition"></a> [aws\_partition](#input\_aws\_partition) | (optional) partition for the base arn if not 'aws' | `string` | `"aws"` | no |
119119
| <a name="input_aws_region"></a> [aws\_region](#input\_aws\_region) | AWS region. | `string` | n/a | yes |
120-
| <a name="input_block_device_mappings"></a> [block\_device\_mappings](#input\_block\_device\_mappings) | The EC2 instance block device configuration. Takes the following keys: `device_name`, `delete_on_termination`, `volume_type`, `volume_size`, `encrypted`, `iops` | <pre>list(object({<br> device_name = string<br> delete_on_termination = bool<br> volume_type = string<br> volume_size = number<br> encrypted = bool<br> iops = number<br> }))</pre> | <pre>[<br> {<br> "delete_on_termination": true,<br> "device_name": "/dev/xvd",<br> "encrypted": true,<br> "iops": null,<br> "volume_size": 30,<br> "volume_type": "gp3"<br> }<br>]</pre> | no |
120+
| <a name="input_block_device_mappings"></a> [block\_device\_mappings](#input\_block\_device\_mappings) | The EC2 instance block device configuration. Takes the following keys: `device_name`, `delete_on_termination`, `volume_type`, `volume_size`, `encrypted`, `iops` | <pre>list(object({<br> device_name = string<br> delete_on_termination = bool<br> volume_type = string<br> volume_size = number<br> encrypted = bool<br> iops = number<br> }))</pre> | <pre>[<br> {<br> "delete_on_termination": true,<br> "device_name": "/dev/xvda",<br> "encrypted": true,<br> "iops": null,<br> "volume_size": 30,<br> "volume_type": "gp3"<br> }<br>]</pre> | no |
121121
| <a name="input_cloudwatch_config"></a> [cloudwatch\_config](#input\_cloudwatch\_config) | (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. | `string` | `null` | no |
122122
| <a name="input_create_service_linked_role_spot"></a> [create\_service\_linked\_role\_spot](#input\_create\_service\_linked\_role\_spot) | (optional) create the service linked role for spot instances that is required by the scale-up lambda. | `bool` | `false` | no |
123123
| <a name="input_disable_runner_autoupdate"></a> [disable\_runner\_autoupdate](#input\_disable\_runner\_autoupdate) | Disable the auto update of the github runner agent. Be-aware there is a grace period of 30 days, see also the [GitHub article](https://github.blog/changelog/2022-02-01-github-actions-self-hosted-runners-can-now-disable-automatic-updates/) | `bool` | `false` | no |

Diff for: modules/runners/variables.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ variable "block_device_mappings" {
5656
iops = number
5757
}))
5858
default = [{
59-
device_name = "/dev/xvd"
59+
device_name = "/dev/xvda"
6060
delete_on_termination = true
6161
volume_type = "gp3"
6262
volume_size = 30

Diff for: variables.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ variable "block_device_mappings" {
234234
iops = number
235235
}))
236236
default = [{
237-
device_name = "/dev/xvd"
237+
device_name = "/dev/xvda"
238238
delete_on_termination = true
239239
volume_type = "gp3"
240240
volume_size = 30

0 commit comments

Comments
 (0)